lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean O'Connor <s...@oconeco.com>
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:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200506.mbox/%3c200506162239.53497.paul.elschot@xs4all.nl%3e

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.

Sean


Fabio Cristiano dos Anjos wrote:

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



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message