Re: NPE in function query, was: Re: getting matching term count for a query

2013-11-18 Thread Michael Sokolov
OK, nevermind - I was the one adding the null --- working example below. Last question -- does anybody know if it's possible to rewrite MultiTermQueries in this context? I don't see how to get a hold of an IndexReader to do that, but if it were possible, it would enable this function to handl

NPE in function query, was: Re: getting matching term count for a query

2013-11-18 Thread Michael Sokolov
So for posterity, this what I ended up doing is below. But I have a problem I don't understand; when I use fl=*,hitcount(), I get the results I expect, but when I use fl=*,hitcount(),hitcount('fulltext_t'), I get an NPE in Solr. This is with Solr 4.2.0. Is there a known bug? I googled a bit

Re: getting matching term count for a query

2013-11-18 Thread Michael Sokolov
OK -- I did find SOLR-1298 which explains how to request the function as a field value. Still looking for a function that does what I asked for ... On 11/18/2013 11:55 AM, Michael Sokolov wrote:

getting matching term count for a query

2013-11-18 Thread Michael Sokolov
Some of our customers want to display a "number of matches" score next to each search result. I think what they want is to list the number of matches that will be displayed when the entire document is highlighted. But this can be slow to do for every search result (some documents can be very