lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean O'Connor <>
Subject Re: Phrase frequency
Date Sun, 04 Sep 2005 19:12:32 GMT
I believe the index just contains information about single terms. A 
PhraseQuery then searches the index for the parts of the phrase and 
returns the hit information.

So, as far as I understand, there is no way to get the frequency of 
phrase directly from an index, but you could create a PhraseQuery, and 
use an IndexSearcher to return the Hits. That will provide only weighted 
hit scores, which does not sound like what you want.

This may be similar to a question I posted back on June 16th. Paul 
Elschot was kind enough to give me feedback. Search for that in the 
archives, or try this link:

In summary, he suggests modify (extend?) PhraseQuery and 
ExactPhraseScorer. I have gotten sidelined on trying to get character 
positions for hits, so have not completed his suggested implementation. 
If I do, I would be happy to share.
Good luck, and feel free to post anything you think might be helpful if 
you implement something.


Fabio Cristiano dos Anjos wrote:

>How can I get phrase frequency in an index?
>Thanks in advance!!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message