<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bashar Eter on Medium]]></title>
        <description><![CDATA[Stories by Bashar Eter on Medium]]></description>
        <link>https://medium.com/@bashareter?source=rss-d6c39f51f3ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*k4JK0CnuXrpdjq0dFEu9fw.png</url>
            <title>Stories by Bashar Eter on Medium</title>
            <link>https://medium.com/@bashareter?source=rss-d6c39f51f3ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:56:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bashareter/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simple way to extract search query intent in search engine| Bigquery | Solr]]></title>
            <link>https://medium.com/analytics-vidhya/simple-way-to-extract-search-query-intent-in-search-engine-bigquery-solr-c049fb5b4592?source=rss-d6c39f51f3ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/c049fb5b4592</guid>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[solr]]></category>
            <dc:creator><![CDATA[Bashar Eter]]></dc:creator>
            <pubDate>Sun, 17 May 2020 22:23:54 GMT</pubDate>
            <atom:updated>2020-05-20T14:25:55.855Z</atom:updated>
            <content:encoded><![CDATA[<h3>Let your customers find what they are looking for | Simple way to extract search query intent| Bigquery | Solr</h3><p>Most modern search engines like <strong>solr </strong>and<strong> elastic search</strong> uses<strong> TF-IDF</strong> like statistical method to calculate relevancy while running a search query. The main problem with this method is that it depends on the documents words and tokens which dose not always reflect what the user want with his query.<br>This is especially true on e-commerce sites as the document wont have long description and text analysis methods like <strong>BM25 </strong>and <strong>TF-IDF</strong> wont work alone.<br>For example, someone might search for <strong><em>iPhone </em></strong>while you have in your documents the following documents:</p><ul><li>Apple <strong>iPhone </strong>8 plus</li><li>Protective cover for <strong><em>iPhone </em></strong>8 plus/ <strong><em>iPhone</em></strong><em> </em>7 plus</li></ul><p>With thous documents your engine will match the <strong>cover </strong>because its term frequency is <strong>2</strong> instead of <strong>1</strong> for the <strong>mobile phone</strong>. However, your customer needs and business logic usual means <strong>he wants the mobile phone</strong>. <br>This problem usual could be solved with <strong>manual query rules</strong>. However manually discovering query rules <strong>is a hard problem</strong> and require a lot of efforts. Luckily, we can utilize <strong>query intent discovery methods to generate automatic query rules</strong>.</p><h3>Basic Information</h3><p>Before we continue we have to talk about what is a query rules and what is a query intent.</p><p><strong>Query rules</strong> are rules that <strong>modify the search engine behavior</strong> when we are running a specific query. For example, we can make a rule that will boost the mobile phones category when the customer search for iPhone. The problem with query rules is that you need an expert in the business to create and track those rules.</p><p><strong>Search query intent</strong> is a broad term that means<strong> the information that describe what the customer means</strong> when he search for something on the site. We can describe it as a set of meta data about the search query. For example, for the iPhone query it could be the set of mobile phones category and Apple brand.</p><p>Now if we can discover the query intent then we can <strong>create a rule that will boost the intent attributes</strong>. The problem here is with finding the intent.<br>Usually people use machine learning techniques to find query intent. In this article we will describe a simple approach without ML that could be used as the <strong>first version</strong> of intent discovery.</p><h3><strong>The solution</strong></h3><p>To answer the question of what is the intention of the user when he search for <strong>iPhone </strong>we can track what<strong> items he ends clicking on</strong>. We can use Google Analytics to capture user clicks then use it to discover the intent as follows:</p><ol><li>Capture users search queries and documents clicks with Google Analytics and store it on Google Big query.</li><li>Run a job that will run a query periodically to fetch users search queries and the attributes of the items that the users have clicked on, then group by those attributes and count the number of clicks for each attribute.</li><li>Create a new index on your search engine (solr or elastic search) and index the search queries with there attributes and there respective counts.</li><li>When you get a new query just search your index by doing a facet on the attribute and summing the counts.</li><li>Sort your attribute by count and get the top couple of them.</li><li>Now this set of attributes and their popularity count will be your intent for this query.</li><li>Add to your main search query a boost query to boost by the fields of attributes that you have got.</li></ol><p>To further illustrate the idea you can check the following diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*Mt6NpPVv7PoU9un5k1NwlQ.png" /></figure><h3>Further notes</h3><ul><li>This is not the only one use case for intent discovery there is many other use cases. Thus, having intent discovery system is good idea if you have a big website.</li><li>Although this is a simple approach, it is better to have it anyway as it cloud be the base of other more complex approach. For example, the collected queries and attributes data could be used as learning data for machine learning intent finding solution.</li><li>One problem with this approach is that finding the intent of new queries is hard as you wont have a document on the intent index for it. However, using a facet will help collecting intent form similar queries. For example, if you have the intent of men shoes that is from Men Fashion category and the intent of Adidas shoes to have Adidas brand then you can find out that Adidas men shoes will be from Men Fashion category with Adidas brand because we are doing a facet on the index and summing the overall popularity count of the attributes.</li></ul><p>Unfortunately, this wont always work if you have a biased index. For example, you might have so many Women Fashion items with Adidas brand that makes it more popular than Men Fashion when we have the word Adidas in the query. Gratefully, you can solve this problem by considering IDF (Inverse document frequency) when calculating items count. In other words, by discounting an attribute value if this value exist in many search queries intent.</p><p>In this article we have discussed how to fetch query intent in a simple way. If you like it give it a clap and follow me for more search and information retrieval articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c049fb5b4592" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/simple-way-to-extract-search-query-intent-in-search-engine-bigquery-solr-c049fb5b4592">Simple way to extract search query intent in search engine| Bigquery | Solr</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>