An offline mode has appeared in the Yandex.Search application: how does it work? Search without the Internet. New beta Yandex Offline application is connecting, results will appear

The Russian Yandex.Search application for iPhone has acquired a hidden search function without an Internet connection. This innovation was discovered by some users of the program after updating to version 2.0. Currently, almost anyone can try out all the benefits of offline search, the Yandex press service told our editors.

Initially, the idea to implement offline access to systems that are not able to work correctly without a direct connection to the Internet came from the developers of navigation systems. The ability to pre-load data, including routes and main directions of public transport, appealed to travelers and ordinary people. Equipping a search engine with similar functionality turned out to be much more difficult, but for the creators of .Search, nothing was impossible.


Any owner of an iPhone or iPad running iOS version 8.1 and later can take part in beta testing. You can activate an initially hidden function by launching the application multiple times and then unloading it from the multitasking menu. After the offline search tab appears in the settings menu, the system will automatically download the information necessary for working offline, the volume of which can range from 40 to 120 megabytes. Yandex does not say what causes such oddities.

>

The downloaded database allows you to access emergency phone numbers, banks, and much of what the average user would be least interested in. At the same time, what’s strange is that the offline search refused to tell me the number of the rescue and ambulance service. Instead, I could improve my own horizons by reading the biography of pop star Philip Bedrosovich Kirkorov, the history of Italy and the Renaissance, and also find out how to get to the city of Orel.


According to some reports, the information provided to users may differ significantly from each other. In other words, the information that some can gain will be completely inaccessible to others. The selectivity of the application, apparently, directly depends on the size of the pre-loaded cache, which is automatically updated at night, provided that you are connected to the Internet. Whether offline search will become ubiquitous without any restrictions remains a mystery at the moment.

Many of us still find ourselves in situations where we need to quickly find important information but have limited or no internet access. It’s one thing to try to open an entertaining post on a website, and quite another to look for the phone number of a bank or hospital hotline. Today, for the first time, I will tell Habr readers about how the acceleration of search in the Yandex application has led to the ability to search for important information without the Internet.

But first, you need to understand the main thing: why did we even undertake offline search if the sites from the search results are still inaccessible in the absence of a network?

EDGE search

Yandex's radars traditionally show people who enter a request, but then leave the page without waiting for it to load due to poor mobile Internet. In this situation, we could not influence the overall quality of the network and the loading speed of all sites, but it was worth trying to make at least the search process less painful and save some time. Actually, that’s why this project was originally called EDGE search, i.e. search on slow internet.

There are two ways to speed up your search. First, optimize the web version and the APIs that the application uses as much as possible. And this work is also being done, but even this is not enough. Secondly, you can pre-load onto your device something that will be useful in case of a poor connection. Obviously, it is physically impossible to fit the entire Internet index into a phone. Therefore, it was necessary to go from the local storage of ready-made search results for specific queries. According to what? No one yet knows how to predict a person’s future needs with high accuracy (but we are learning). Therefore, we take popular recurring requests.

When we talk about popular queries, many people imagine a [VKontakte] query and several similar ones. In fact, we have hundreds of thousands of less obvious requests that are regularly repeated in large numbers. And this is already many hundreds of megabytes of results. Moreover, we planned to save not only the search results, but also the hints that appear during the process of entering a query. And here many will ask: why store hints offline, since a person is quite capable of entering a query without them?

When entering queries in the Yandex application, users do not see ordinary search suggestions, but in the form of individual words/pairs of words (i.e. predictive text input). Regular hints cannot be edited: if you need to add a word, you will have to enter the entire query yourself. Hints in the form of words allow you to make edits, cover a much larger number of queries and significantly speed up their entry by a person.


But the main thing is that the tips turned out to be especially useful when working offline. These hints help people phrase their question in a way that most people do, which in turn increases the chance that the answer will be retrieved from the local cache. That is why it was important to save the tips.

Empirically, we selected a certain minimum of search queries (about 150 thousand) and tips, less than which there was no point in storing any more. But the volume of all this luggage was still beyond decent (several hundred megabytes). Even taking into account the fact that only the top 10 results were stored for each query. Something had to be done.

From optimization to offline

We started looking for everything that could be sent “under the knife.” Each result contained not only links to sites, but also favicons and snippets. Favicons are pictures, which means serious savings could be achieved here. The same site can appear in the results for completely different queries, so we initially did not duplicate favicons, but stored them by site. And then we made it so that the probability of saving the favicon is directly proportional to the frequency of the site appearing in search results. In other words, we abandoned most of the favicons, but visually this is not very noticeable.


The more we reduced organic search results in favor of ready-made answers, the closer we came to understanding that our EDGE search was no longer just speeding up the work, but was capable of answering a wide range of questions without an Internet connection at all. Without noticing it, we were already working on offline search. This means that you have to rely on ready-made answers. Having realized this, we began to enrich the database with important facts that previously could not get there due to limited popularity of the request. These results contain only answers, without listing sites.


Using a similar scheme, we copied into the database all the object response cards and all requests for which the object response is available. Offline search cards differ from the originals in the almost complete absence of pictures: we removed them for reasons of economy.

The growth of the fact base required further work on optimization and a data storage structure that would be careful about device resources.

Dictionaries

The database is not downloaded to the device as a whole, but in the form of separate dictionaries, and only with a Wi-Fi connection and only with a sufficient charge level. The division into dictionaries was made for two reasons. Firstly, if the connection breaks during downloading, then during the next attempt only those dictionaries will be downloaded that were not downloaded earlier. Secondly, to further save space, the database is downloaded and stored on the device in a compressed form, but with each request it is not unpacked entirely, but only in the necessary parts.


Each dictionary contains queries starting with certain letters, as well as all the data for search results and hints for these queries. It turned out to be more logical to sort the data before dividing it into dictionaries by the first letters of queries than, for example, by their popularity. Imagine the situation: the first dictionary contains the most popular queries, the second contains slightly less popular ones, and so on. But the popularity of queries often changes, and this will lead to the need to regularly update dictionaries just to move a query from one to another. This costs traffic, energy and time. Therefore, it was important to ensure that when updating the database, queries did not move between dictionaries. Alphabetical order turned out to be a simple and effective solution.

Answers to the same queries may vary in different parts of the country, so different dictionaries are formed for different regions. Moreover, during short-term visits to another region, the application will not rush to update dictionaries - we have provided scenarios for business trips and tourism.

No matter how hard we try, offline search does not cover all possible queries, but it already helps out on average every third time. As with any average result, this means that some users encounter offline responses much more often than others. Therefore, we, of course, allow you to completely disable offline search in the settings.

Our team would be interested to know the opinion of Habr readers about this direction and to receive feedback on the work of the beta Yandex application for Android. Thank you.

True, it is still in closed beta.

On June 30, Yandex updated its search engine for iOS to version 2.0, which introduced several small useful innovations, which are described in the description of the update in the App Store, but the developers kept silent about the most interesting ones. As Tjournal reports, the application has introduced an offline search function in beta mode, which allows you to find answers to some questions without an Internet connection.

The “Offline Search” section in the application did not appear for everyone, only for a small number of testers. When used, the service downloads to the device a “small database of answers to popular queries” of more than 100 MB in size.

Yandex uses this database when the user tries to find something without an Internet connection or at a slow speed (for example, via Edge). The database contains telephone numbers of support services and hotlines, basic information about famous people and films, as well as a translator. Offline search displays text information only.

The database of online responses to requests is updated once a day, provided there is a connection to Wi-Fi and sufficient battery power on the device, Yandex said. It is still unknown when and whether the new function will be fully operational. As well as whether users on Android will be able to test it.

Yandex - search and picture of the day

For free
Customer ratings: 3.5 (33 ratings)
Developer: Yandex LLC
Categories: Utilities, Directories
Languages: English, KK, Russian, Turkish, UK
Size: 23.34 MB

Many of us still find ourselves in situations where we need to quickly find important information but have limited or no internet access. It’s one thing to try to open an entertaining post on a website, and quite another to look for the phone number of a bank or hospital hotline. Today, for the first time, I will tell Habr readers about how the acceleration of search in the Yandex application has led to the ability to search for important information without the Internet.

But first, you need to understand the main thing: why did we even undertake offline search if the sites from the search results are still inaccessible in the absence of a network?

EDGE search

Yandex's radars traditionally show people who enter a request, but then leave the page without waiting for it to load due to poor mobile Internet. In this situation, we could not influence the overall quality of the network and the loading speed of all sites, but it was worth trying to make at least the search process less painful and save some time. Actually, that’s why this project was originally called EDGE search, i.e. search on slow internet.

There are two ways to speed up your search. First, optimize the web version and the APIs that the application uses as much as possible. And this work is also being done, but even this is not enough. Secondly, you can pre-load onto your device something that will be useful in case of a poor connection. Obviously, it is physically impossible to fit the entire Internet index into a phone. Therefore, it was necessary to go from the local storage of ready-made search results for specific queries. According to what? No one yet knows how to predict a person’s future needs with high accuracy (but we are learning). Therefore, we take popular recurring requests.

When we talk about popular queries, many people imagine a [VKontakte] query and several similar ones. In fact, we have hundreds of thousands of less obvious requests that are regularly repeated in large numbers. And this is already many hundreds of megabytes of results. Moreover, we planned to save not only the search results, but also the hints that appear during the process of entering a query. And here many will ask: why store hints offline, since a person is quite capable of entering a query without them?

When entering queries in the Yandex application, users do not see ordinary search suggestions, but in the form of individual words/pairs of words (i.e. predictive text input). Regular hints cannot be edited: if you need to add a word, you will have to enter the entire query yourself. Hints in the form of words allow you to make edits, cover a much larger number of queries and significantly speed up their entry by a person.

But the main thing is that the tips turned out to be especially useful when working offline. These hints help people phrase their question in a way that most people do, which in turn increases the chance that the answer will be retrieved from the local cache. That is why it was important to save the tips.

Empirically, we selected a certain minimum of search queries (about 150 thousand) and tips, less than which there was no point in storing any more. But the volume of all this luggage was still beyond decent (several hundred megabytes). Even taking into account the fact that only the top 10 results were stored for each query. Something had to be done.

From optimization to offline

We started looking for everything that could be sent “under the knife.” Each result contained not only links to sites, but also favicons and snippets. Favicons are pictures, which means serious savings could be achieved here. The same site can appear in the results for completely different queries, so we initially did not duplicate favicons, but stored them by site. And then we made it so that the probability of saving the favicon is directly proportional to the frequency of the site appearing in search results. In other words, we abandoned most of the favicons, but visually this is not very noticeable.

The more we reduced organic search results in favor of ready-made answers, the closer we came to understanding that our EDGE search was no longer just speeding up the work, but was capable of answering a wide range of questions without an Internet connection at all. Without noticing it, we were already working on offline search. This means that you have to rely on ready-made answers. Having realized this, we began to enrich the database with important facts that previously could not get there due to limited popularity of the request. These results contain only answers, without listing sites.

Using a similar scheme, we copied into the database all the object response cards and all requests for which the object response is available. Offline search cards differ from the originals in the almost complete absence of pictures: we removed them for reasons of economy.

The growth of the fact base required further work on optimization and a data storage structure that would be careful about device resources.

Dictionaries

The database is not downloaded to the device as a whole, but in the form of separate dictionaries, and only with a Wi-Fi connection and only with a sufficient charge level. The division into dictionaries was made for two reasons. Firstly, if the connection breaks during downloading, then during the next attempt only those dictionaries will be downloaded that were not downloaded earlier. Secondly, to further save space, the database is downloaded and stored on the device in a compressed form, but with each request it is not unpacked entirely, but only in the necessary parts.

Each dictionary contains queries starting with certain letters, as well as all the data for search results and hints for these queries. It turned out to be more logical to sort the data before dividing it into dictionaries by the first letters of queries than, for example, by their popularity. Imagine the situation: the first dictionary contains the most popular queries, the second contains slightly less popular ones, and so on. But the popularity of queries often changes, and this will lead to the need to regularly update dictionaries just to move a query from one to another. This costs traffic, energy and time. Therefore, it was important to ensure that when updating the database, queries did not move between dictionaries. Alphabetical order turned out to be a simple and effective solution.

Answers to the same queries may vary in different parts of the country, so different dictionaries are formed for different regions. Moreover, during short-term visits to another region, the application will not rush to update dictionaries - we have provided scenarios for business trips and tourism.

No matter how hard we try, offline search does not cover all possible queries, but it already helps out on average with every third one. As with any average result, this means that some users encounter offline responses much more often than others. Therefore, we, of course, allow you to completely disable offline search in the settings.

Our team would be interested to know the opinion of Habr readers about this direction and to receive feedback on the work of the beta

What is offline mode? In simple terms, this is the ability to work in any application without access to communication. For computers, this means disconnecting, first of all, the Internet, and possibly the local network. For mobile phones, this also disables both telephone service and Bluetooth.

Why is offline mode needed on computers?

Most PC users, even when working in programs that are not related to the need to access the Internet, are constantly connected to it. Some are out of habit, others are due to the use of operating systems such as ChromeOS. In this system, all actions are performed via the Internet. If you need to print something, but there is no access to the Internet, then you will not be able to do anything, unless, of course, the document is saved in local storage and there is no other operating system.

In addition, it is known that Google tracks the actions of users and transfers their personal data to American intelligence agencies upon request. If you are not concerned about privacy issues, then remember that for MS Windows, which most users use, the Internet is full of viruses, and picking them up where the Internet could not be used is sometimes quite offensive.

Offline mode in mobile phone

After we figured out what offline mode is on a computer, let's see what it is on a mobile phone.

In phones running the Android operating system, it is called "Offline Mode". It is used in places where the use of mobile communications is unacceptable. An example of such a place would be an airplane, which is why this mode in phones is often called “Airplane Mode.” Using this mode allows you to save the battery, which, as you know, tends to discharge at the most inopportune times.

How to disable offline mode? This happens differently on different phones. Usually this option is located in “Settings”, where you need to select “Profiles” or “Modes”, and then check the box next to “Normal mode”. Some models require a reboot, after which you will be automatically prompted to return to normal mode.

Removing offline mode in browsers

If you have limited traffic that suddenly begins to run out, you need to urgently go offline. What is being done in this case? You should enable offline mode in the browsers used to access the World Wide Web. Then many of the pages that were visited while the Internet was running can be viewed from the cache.

In this case, the answer to the question “how to remove offline mode” is quite trivial - you need to uncheck the “Offline mode” box. In new versions of browsers, the menu bar is usually hidden, so you need to call it in an accessible way, for example, by pressing Alt on the keyboard, and then select “Offline mode”.

Offline as a synonym for invisibility

The term “offline” has become so popular that it has come to be used not only as an indicator of the absence of the Internet, but also as an indicator of a real or imaginary absence from the Internet. So, you can go to the social network VKontakte and become invisible to other users. That is, you will be present on the site, but for other users your status indicates completely opposite information. This is also called "being offline".

Work with some Internet applications offline

Initially, online applications such as Google Docs were given the ability to work offline. It can be noted that this promotes healthy rivalry between the creators of office applications, primarily Microsoft and Google, which should increase their competitiveness.

How to enable offline mode in Google Docs? This can be achieved using the Chrome browser or its open-source counterpart Chromium. We open our “cloud” in Google (Google Drive) - for this you need the Internet, then in the navigation panel click on the “More” button. We select the “Offline” category, as a result of which instructions will appear, which indicate that you first need to install the addon for these purposes, and then click the offline access button. This will cause files from the cloud to be copied to your local storage device. After this, you can turn off the Internet and work with Google Docs offline.

Thus, we answered the question: “How to enable offline mode in Google Docs applications?”

You can work in a similar way with Google Maps. When in online mode, an area on the map is indicated that will be needed when working offline. The map is then downloaded and the area can be searched offline.

In a mobile phone, offline mode can be enabled not only by completely disabling the mobile network, but also by disabling one Internet connection by unchecking the “Mobile data use” box.

Exiting offline mode

Sometimes, for certain applications, logging offline may be blocked by firewalls. So, Steam also provides an offline mode for games. At the same time, some users in Social Club cannot leave offline mode. In order to remove this restriction, you need to go to the firewall settings and adjust the rules and zones there. Here these Social Club files are given a taboo to go online. It must be removed, after which exiting offline mode will be possible.

This applies not only to Social Club, but also to some Steam games. Possibly observed in other applications.

How to exit offline mode? If this operation is blocked, go to the firewall, check the rules and zones, and make them permissive for this application. If this happens frequently, check your Windows Firewall settings.

Finally

To summarize: what is offline mode? In addition to the fact that this is a mode without access to the Internet, this term also means invisibility in some social networks. Some Internet applications are able to work offline, while downloading “cloud” files to local storage.