Note that there are some explanatory texts on larger screens.

plurals
  1. POSphinx, set exact matches for each record?
    text
    copied!<p>So I've been using Sphinx with a rails project lately, I want to provide a list of 'would be' exact matches that would match 100% with a give term. For example something like:</p> <pre><code>+==================+==========================================================+ | ingredient | exact matches | +==================+==========================================================+ | cheese, cream | 'cream cheese','philadephia cream cheese','cream chese',| | | 'creamed cheese' | +------------------+----------------------------------------------------------+ | Cheese, gruyere | 'gruyere','gruyer cheese','gruyeres cheese' | | | 'gruyere chese' | +------------------+----------------------------------------------------------+ | Cheese, blue | 'blue cheese','blu cheese' | +------------------+----------------------------------------------------------+ </code></pre> <p>So basically the functionality I'm looking for would be that Sphinx would try to do its typical matching on all the records, but if the search term matches exactly with one of the strings in an array in that record that result would have a much higher weight. (like 100x, so it would then be the best match) </p> <p>Is this possible? It seems like other people would have had this problem before... no?</p> <hr> <p><strong>Update</strong></p> <p>I suppose the best answer might be to just index the <code>exact matches</code> column and provide a really high weight to the terms.</p> <p>I'm not sure how I can break up the "array" and see if the search term matches exactly though...</p>
 

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