Hi Adam

I don’t think Sphinx is going to work with such fine-tuned ranking logic when 
searching on items, but maybe there’s another way...

You *can* boost Item 1’s ranking if any terms related to that item match. But 
you *can’t* boost Item 1’s ranking by differing values depending on *which* of 
those terms match. Sphinx doesn’t have that level of detail available in its 
query language (SphinxQL).

One alternative is to have this boost table as the model you’re searching on, 
with all item information also pulled in - but then you could end up with 
duplicate items (when more than one boost record matches). Perhaps that’s 
acceptable? Maybe grouping results by item_id could help this work to avoid 
duplicates - I’m not quite sure how ranking works with grouped results though 
(is it an average of all items within a group? a sum? maximum?).

This is certainly more complex, and I’m not *certain* whether it’ll work. It 
could be worth investigating though… depends on time and priorities, of course 
:)

Happy to discuss finer points of this if it’s useful.

Cheers

— 
Pat

> On 23 Feb 2015, at 1:53 pm, Adam Gamble <[email protected]> wrote:
> 
> I meant boost  not boot :(
> 
> On Sunday, February 22, 2015 at 7:48:52 PM UTC-6, Adam Gamble wrote:
> I'm wanting to boot individual items in my search results based on the query 
> being performed. I'd like to assign a number to a result that will boost it 
> specifically for that query.
> 
> Example:
> Item 1 gets a 20 point boost when the search is for flowers, but the same 
> item only gets 5 points when the search is for cloud. My idea is to store 
> this in our DB as a table like so:
> 
> item_id | query     | boost
> 1          | "flowers" | 20
> 1          | "clouds"  | 5
> etc. etc.
> 
> Any ideas how I go achieve something like this? Also is this a terrible idea? 
> Basically I was going to run a process that is constantly tweaking these 
> boost numbers based on how the items perform (views, downloads, etc) in a 
> specific search
> 
> I hope this makes sense, let me know if you need more explaining.
> 
> Thanks
> Adam
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/thinking-sphinx 
> <http://groups.google.com/group/thinking-sphinx>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to