Sort Lucene query by best match?

233 views
Skip to first unread message

Jon Wynveen

unread,
Aug 9, 2012, 3:48:53 PM8/9/12
to rav...@googlegroups.com
When doing a Lucene query (session.Advanced.LuceneQuery<>()), is there a way to sort results by which is the best match? Is there even any way to determine which are better matches than others?

Itamar Syn-Hershko

unread,
Aug 9, 2012, 4:25:22 PM8/9/12
to rav...@googlegroups.com
It is the default sort order, unless you set another, then this becomes the secondary sort order

There is a Temp-Index-Score metadata value sent for each result, this value tells you which result is "better" (higher the number, the higher the relevance is)

maxx

unread,
Oct 15, 2012, 2:58:38 PM10/15/12
to rav...@googlegroups.com, ita...@hibernatingrhinos.com
the default sort direction is descending (high to low) is it possible to sort "Temp-Index-Score" ascending (from low to high) through the HTTP-API?

Oren Eini (Ayende Rahien)

unread,
Oct 15, 2012, 8:09:09 PM10/15/12
to rav...@googlegroups.com, ita...@hibernatingrhinos.com
No, that would mean that you would find the best matches last.
Reply all
Reply to author
Forward
0 new messages