Re: What's the most efficient way to sort by number of terms matched?

2014-11-06 Thread Ahmet Arslan
Hi Trey, Not exactly the same but we did something similar with (e)dismax's mm parameter. By autoRelax'ing it. In your example, try with mm=3 if numFound 20 then try with mm=2 etc. Ahmet On Thursday, November 6, 2014 8:41 AM, Trey Grainger solrt...@gmail.com wrote: Just curious if there

Re: What's the most efficient way to sort by number of terms matched?

2014-11-06 Thread Sujit Pal
Hi Trey, In an application I built few years ago, I had a component that rewrote the input query into a Lucene BooleanQuery and we would set the minimumNumberShouldMatch value for the query. Worked well, but lately we are trying to move away from writing our own custom components since

Re: What's the most efficient way to sort by number of terms matched?

2014-11-06 Thread Mikhail Khludnev
Sadly, it seems it wasn't been done so far. It's either custom similarity or function query. On Thu, Nov 6, 2014 at 9:40 AM, Trey Grainger solrt...@gmail.com wrote: Just curious if there are some suggestions here. The use case is fairly simple: Given a query like python OR solr OR hadoop, I

What's the most efficient way to sort by number of terms matched?

2014-11-05 Thread Trey Grainger
Just curious if there are some suggestions here. The use case is fairly simple: Given a query like python OR solr OR hadoop, I want to sort results by number of keywords matched first, and by relevancy separately. I can think of ways to do this, but not efficiently. For example, I could do: