You could always do a custom search component, but all the same information (which terms matched) is in the debugQuery. For example, "queryWeight(text:the)" indicates that "the" appears in the document.

What exactly is it that is too slow?

Yes, you do have to accept that explain uses analyzed terms. I would note that you could try to correlate the "parsedquery" with the original query since the parsed query will contain stemmed terms.

It would be nice to have an optional search component or query parser option that returned the analyzed term for each query term.

But as things stand, I would suggest that you do your own "fuzzy match" between the debugQuery terms and your source terms. That may not be 100% accurate, but probably would cover most/many cases.

-- Jack Krupansky

-----Original Message----- From: Michael Jakl
Sent: Wednesday, July 04, 2012 10:09 AM
To: solr-user@lucene.apache.org
Subject: Re: Get all matching terms of an OR query

Hi!

On 4 July 2012 17:01, Jack Krupansky <j...@basetechnology.com> wrote:
First, "OR -ipod" needs to be written as "OR (*:* -ipod)" due to an ongoing
deficiency in Lucene query parsing, but I wonder what you really think you
are OR'ing in that clause - all documents that don't contain "ipod"? That
seems odd. Maybe you really want to constrain the preceding query to exclude
ipod? That would be:

(android OR google OR apple OR iphone) -ipod

Thanks, the example was ill-chosen, the -ipod part shouldn't be there.

After some more tests and research, using the debugQuery method seems
the only viable solution(?)

Cheers,
Michael

Reply via email to