The Lucene PhraseQuery goes through a lot of effort to calculate "phrase frequency" (phraseFreq) - but that is not the same as term frequency (don't confuse terms and phrases). Feel free to pick that number out of the debugQuery output, or from the XML variant of the explain output.

For reference, an example:

0.2169777 = (MATCH) weight(text_t:"quick brown" in 0) [DefaultSimilarity], result of:
 0.2169777 = fieldWeight in 0, product of:
   1.4142135 = tf(freq=2.0), with freq of:
     2.0 = phraseFreq=2.0
   0.61370564 = idf(), sum of:
     0.30685282 = idf(docFreq=1, maxDocs=1)
     0.30685282 = idf(docFreq=1, maxDocs=1)
   0.25 = fieldNorm(doc=0)

So, it is really "phraseFreq" and then Lucene treats phraseFreq as if it were term frequency (tf) in the similarity calculation.

-- Jack Krupansky

-----Original Message----- From: danielitos85
Sent: Monday, August 19, 2013 10:25 AM
To: solr-user@lucene.apache.org
Subject: Re: get term frequency, just only keywords search

ok I undestand it (thanks) but if I search a sentence and type
"debugQuery=on", in the explain I obtain termFreq=2.0 and it right.

Is it possible to obtain that parameter?



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

Reply via email to