Note that there are some explanatory texts on larger screens.

plurals
  1. PORails Searching (Full text vs Semantic) for Food Products
    primarykey
    data
    text
    <p>I'm trying to build a search interface for a grocery store in Rails. I have several grocery store products stored in my database, but I'm struggling to find a good way to search through them.</p> <p>So far, I've used <a href="http://freelancing-god.github.com/ts/en/" rel="nofollow">Thinking Sphinx</a> to do full text searching of the products. This works well for some items, such as 'eggs', but has several problems for other searches, such as 'lime'.</p> <p>For example, when I search for 'lime', I get the following returned items:</p> <ul> <li>Diet Sierra Mist Lemon Lime Fridge Mate Soda</li> <li>G2 Lemon Lime Low Calorie Electrolyte Beverage</li> <li>Deer Park Berry Lime Sparkling Water</li> <li>Ocean Spray Cocktail With Lime Cranberry Juice</li> <li>Vintage Seltzer Water Limn Lime</li> <li>Coke Diet With Lime Soda Contour Bottle</li> <li>Coke Diet With Lime Soda Fridge Pack</li> <li>Diet Sierra Mist Lemon Lime Fridge Mate Soda</li> <li>Refreshe Soda Diet Lemon Lime Fridge Pack</li> <li>Refreshe Soda Lemon Lime</li> <li>Refreshe Soda Lemon Lime Fridge Pack</li> <li>Sierra Mist Natural Lemon Lime Soda</li> <li>... etc</li> </ul> <p>All I really wanted was the actual fruit, which are listed as these products in my database:</p> <ul> <li>Limes Large</li> <li>Organic Limes</li> <li>Limes Key Prepacked</li> </ul> <p>How can I make my search more intelligent?</p> <p>It's worth noting that I do have a lot of categorical data on each product. I essentially have an entire "food tree", where each product is a root node of the tree.</p> <p>For the product 'Limes Large', for example, I have the following categories: </p> <p>Fruits &amp; Vegetables > Fresh Fruit > Citrus > Limes Large</p> <p>How can I better use these categories to improve my search?</p> <p>In my research, I am starting to believe I need to use semantic searching instead of full text searching. I came across the <a href="http://florianhanke.com/picky/index.html" rel="nofollow">Picky gem</a> for Ruby, which looks promising, but I'm not sure if I have the right approach. </p> <p>Can semantic searching help me perform a better search? Is Picky a good fit for data categorized in this way? Any other insights? Any guidance would be really appreciated. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload