lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Calò <>
Subject Frequency Term of Composite words
Date Wed, 16 Dec 2009 15:34:09 GMT
I All

I Hope that you can help me on this.

I'm looking for a fast way to obtainf for a given word, its term frequency
(I mean how many times it is available in a single doc). I've looking into
mail archive and LIA (Lucene In Action) book and I found something like

IndexSearcher index = new IndexSearcher(invertedIndexinRam);
Term term = new Term("doc", "quick");
int occurrence = index.docFreq(term);

ok, occurrence contains the occurrences of the word "quick" into the index
(In my case the index will contain only one document example "the quick
brown fox jumps over the lazy dog"). In this case the occurrence will be 1.

But now I need to retrieve the occurrency of a composite word: as example
"quick brown fox" but I'm quite in trouble on how could I perform this.

Thanks in advance for your help.

Best Regards.


Antonio Calò
Software Developer Engineer
@ Intellisemantic
Tel. 011-56.90.429

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message