How to get certain documents to rank higher than others in a general sense


(Kelly Sauke) #1

Everyone-

How would you solve this issue?

I'm building a product search but I'm running into issues with
generalizing how boosting happens. In one example I search for the term
"ladder" and I get results where the terms "ladder parts" and "ladder
wheels" are higher than "step ladder" or "platform ladder". In other
cases I want a higher ranking where the search term exists at the
beginning of matched string as opposed to the end. How do I go in and
boost those specific documents but only for specific search terms? Is
that possible?

I'm using the snowball analyzer with English language. Perhaps there is
a better analyzer to use?

Thanks for your help!
-Kelly

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/53344357.4080007%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Alexander Reelsen) #2

Hey,

scoring is generally one of the more complex parts of search, not because
it uses math, but because everyone defines relevancy different. If you are
interested, how scoring works generally, take the time to read
https://lucene.apache.org/core/4_7_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html

However, in most real applications you would want to change the scoring on
different parameter of a document, for example if your are running a
bidding site or a news portal, time is an important factor. This is why the
function_score has been added to elasticsearch, see
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html

Another interesting thing might be to score documents up, where two search
terms are near to each other and so forth...
The freshly released definitive guide (a not yet fully complete online
book) gives a really great introduction into this, see
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/search-in-depth.html

The question is, do you really want to work on such single term examples
like the ladder one, to heavily affect your scores or does it make more
sense to take more than full-text search into account to achieve your
requirements? Also, dont mix it up with relational databases on how those
queries work.

Hope this helps as a start.

--Alex

On Thu, Mar 27, 2014 at 4:27 PM, Kelly Sauke ksauke@gmail.com wrote:

Everyone-

How would you solve this issue?

I'm building a product search but I'm running into issues with
generalizing how boosting happens. In one example I search for the term
"ladder" and I get results where the terms "ladder parts" and "ladder
wheels" are higher than "step ladder" or "platform ladder". In other cases
I want a higher ranking where the search term exists at the beginning of
matched string as opposed to the end. How do I go in and boost those
specific documents but only for specific search terms? Is that possible?

I'm using the snowball analyzer with English language. Perhaps there is a
better analyzer to use?

Thanks for your help!
-Kelly

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/53344357.4080007%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9vPxHBzOMXkp3Wex-Jr5xx5crGYEYpkvzeZorizTzAvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3