6

What is a search query and how is it processed by a search engine?

 1 year ago
source link: https://www.algolia.com/blog/product/what-is-a-search-query-and-how-is-it-processed-by-a-search-engine/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

What is a search query and how is it processed by a search engine?

May 30th 2022

Product

jbxugiedb4w3sfzr6kll.jpg
placeholder-307ec63d6beae325523d6e7a7f86df68.png

Where can I get ramen asap near me?

How many ants does it take to kill a human?

Check engine light youtube

What is the meaning of life?

These are typical Google searches; just a few of the many concerns on the minds of people as they’re trying to navigate the complexities of their daily lives. 

Being able to web search using any of many available search engines, both public and private, has changed, and is still profoundly changing, many aspects of life in the developed world. It’s hard to imagine that we survived, or that we weren’t bored to tears, before people were able to glue themselves to their electronic devices and instantly Google any question — urgent and critical or random and nonessential — that pops into their heads.

So you probably know what a search query is (well yeah, you handle them every day). But let’s review just in case, and then get into the second, less-obvious part about how a search query is processed.

What is a search query?

If you’re thinking “the string of words someone uses to ask a question,” bravo!

“Query” sounds a lot like “question.” How are they different? 

According to WikiDiff, a query is indeed a question or an inquiry. Then, by comparison, what’s a question? “A sentence, phrase, or word that asks for information.” 

If a query and a question still sound like the same thing to you based on this definition, you’re not alone. Hmm. Next query, er, question: Is WikiDiff reliable? Maybe not.

At any rate, let’s get back to Search Queries 101. There’s an astounding number of search terms being entered in search boxes (and by using digital voice assistants and voice-search apps). Google processes roughly 100,000 searches every second. And that’s just Google.

What are people querying about? Mainly how to go somewhere on the Web, like a company’s home page; how to do something, or how (or where) to buy something. 

There are three flavors of search query, according to those in the know. Here’s what you need to know about the three different types of search queries:

Navigational search queries

This is when the person has a certain website (the landing page or a particular subpage on the site, like the FAQs) in mind and intends to go there. Maybe they know the (relatively simple) URL but are too lazy to type it in their browser. Maybe they’re surfing their social media feed and see a conversation about the benefits of brushing their dog’s fur, so they query for the name of a local pet supply store. They may not know the exact URL or spelling of the company name, and they figure it’s just easier to query for it.

What are some examples of navigational queries? The top ones on Google are simply “facebook” and “youtube.”

Informational search queries

As the name of this one makes pretty obvious, the person is seeking general guidance, facts, or figures — for instance, the steps for how to do something like bake a batch of red velvet cupcakes. 

An informational search might be phrased as a question, such as “How do I recycle a refrigerator?” or “How much alcohol is in non-alcoholic beer?”, but could also be as simple as one word, such as “latte” or “parakeets.”

Transactional search queries

Yep, in this case, the person wants to buy something, either on an ecommerce site or in a brick-and-mortar store. They possess what’s known as “transactional intent.” Using search engine optimization (SEO) to target keywords is applicable mostly for this type of query, since the right words used in digital marketing will rank your business higher in people’s search results and potentially lead to higher revenue.

Examples of a transactional query: “Buy Breville espresso machine”, “deal on iPhone 13”, “best dog brush”.

The journey of a search query

What goes on within the “brain” of a search engine when someone enters a search query in a search bar? What’s happening under the proverbial hood?

Most search engines parse the query and then send it to the index server for processing. 

“Some search engines may “preprocess” the query, using spell checking or query suggestions (essentially asking the searcher “Do you mean….?”).

It’s matched to web pages considered relevant in the search engine’s index, and various rules and parameters are applied. The listing order on the search engine results page (SERP) is then determined based on the best relevance.

To envision the mechanics, it helps to know how a search engine prepares its information index to be searched. For starters, an “index” is where the data is stored. Most search engines store their data in an index in a structured way called an inverted list. 

For instantaneous information retrieval, the engine reverses the logic and structures the index in an “inverted” flow. So instead of scanning a document looking for words, it matches words in order to locate documents. 

Here’s how the search query aardvark could be processed in this model:

image1-1-635x400.png

As you can see, when you type an a, you get every word that starts with a (and every other alphabetical column is ruled out). If you keep adding letters to your query (aa, then aar), each addition narrows down your matches. And voila, you end up with four relevant search results that will tell you all about earth pigs.  

Keep in mind that because different search engines use individual proprietary algorithms, they all operate and rank relevant terms slightly differently. Plus, in addition to the actual search query, a search engine may consider other relevant data to help it decide how to rank the results, including the searcher’s:

  • Physical location. Are they at the mall? 
  • Detected language. A query in Spanish deserves search results in Spanish.
  • Earlier search history. Were they looking for the same type of thing earlier, only in a different brand or model?
  • Type of device. Are they on their mobile phone?

Identifying searcher intent

For every search engine out there, the key is deciphering the gist of what the searcher intends to find out. Are they trying to simply learn about Canada’s geography, or are they interested in booking a cross-Canada train trip? Do they want to know about the Check engine light because their car overheated and they’re stuck on a freeway median, or because they’re just curious about what could go haywire if they forget to schedule a recommended tune-up? What’s the user intent?

So the search engine is kind of like a psychic trying to read the searcher’s mind, only it’s more like a scientist going through a rigidly ordered checklist (as fast as possible).

As the search engine is comparing records and figuring out rank, it’s asking itself questions like:

Is there a typo in the query? If so, one or multiple?

What does the number of typos have to do with rank? The fewer typos, the better:

  • If there aren’t any typos in the query, the page content ranks higher as a match than if there’s a typo
  • Content generated for queries with one typo ranks higher than that generated by a two-typo query
  • What if the user is a sloppy query enterer and there are (horrors) three typos? Well, they would be out of luck and get zero results because simple textual matching doesn’t correct spelling.

Does the query match on the first letter? Does it match the whole word or only partially?

In prefix search, the search engine compares the whole query with the beginning characters in the attributes of a record in the index. For example, it compares be with best and beatles. But it doesn’t break up the query and search for b, then be, for instance. 

Relevant results are generated as snippets indicating how the query matches phrases that appear in the content.

The records are ranked as having stronger or weaker relevance, which determines the order of the search results starting on the first page. 

Query context also plays a role. To asses the context, the search engine asks itself questions like these:

Does a word in the query match a synonym?

If it does, the search engine will treat the record with the synonym as equal in the ranking process. For example, if the available content contains tights but the searcher asked for leggings, they’ll see search results for both.

Does the query match the title of a record or its description?

With searchable attributes, items whose titles match the query rank higher than items that match on the description.

Is one item more popular than another?

If you have three records that all match perfectly, then the search engine uses custom ranking to add “business metrics” such as prioritizing the one with the most sales, the one most searched for, or the most popular. If two records match differently, then other criteria determine the ranking.

When a competent search engine finishes wracking its index brain and methodically answering all these types of questions, it comes up with its list of relevant search results. The SERP really does look like the handiwork of a psychic scientist. More importantly, the search engine does the critical job of steering the searcher to a web destination, enlightening them with the answer to their pressing question, or pointing them to where they can buy a product.

For example, here’s a great answer from Google to the pressing query “What is the meaning of life?”

One last query: How does Algolia’s search engine rank?

Answer: As a fast, advanced search engine, it’s way up there. Our advanced search API powers billions of search queries for thousands of global companies, instantaneously delivering relevant results (in less than 100 ms).

One reason our customers love it: we use a tie-breaking algorithm to ensure that the best search-result matches appear first. As an added bonus, our search features are transparent. There are no secrets or complicated formulas; you can see the methodology and criteria being employed to find and rank your content. And you can easily configure your search parameters for your company’s specific needs. 

Ready to find out more? Ask for a free demo of our search engine and we’ll be happy to show you what you can do!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK