Probably your best bet is to use the "debug.explain.structured" parameter, set to true, to get the XML version of the debug explain section and then you can traverse looking for the desired phrase and then the "phraseFreq".

But, be aware that the terms in a Lucene query have been "analyzed", so they won't necessarily be exactly the same as your source query characters.

My advise would be to abandon "phrase frequency" since it is probably more effort than it is worth. But if your management insists on having the feature, roll up your sleeves and write the code needed to ferret it out.

-- Jack Krupansky

-----Original Message----- From: danielitos85
Sent: Wednesday, August 21, 2013 4:41 AM
To: solr-user@lucene.apache.org
Subject: Re: get term frequency, just only keywords search

Thanks a lot guys,

@Jack in my search I use dismax (how defType) and I search either term or
phrase, but I need to get the number that show me how many time that term or
phrase is in the document.

I could get it from debugQuery but I would like get it directly from the
results.

What do you suggest?
Thanks a lot for support.



--
View this message in context: http://lucene.472066.n3.nabble.com/get-term-frequency-just-only-keywords-search-tp4084510p4085831.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to