Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

Counting occurrence of text on a lucene index

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


aionius at gmail

Nov 6, 2009, 1:35 PM

Post #1 of 2 (200 views)
Permalink
Counting occurrence of text on a lucene index

Good day to all.

I'm trying Lucene and so far I've managed to create an index, query and get
the result.
I just have some few questions. How can I get the number of occurrences of
the query string
on my index? For example, I'm searching for the word "hyperspace" on my
indices, Lucene
found it on pages 5, 6, and 8. Now I want to know how many times the word
"hyperspace"
was found on each of those pages.

Is this possible in Lucene?

Any help would be appreciated.


--
View this message in context: http://old.nabble.com/Counting-occurrence-of-text-on-a-lucene-index-tp26230903p26230903.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene


simon.willnauer at googlemail

Nov 6, 2009, 2:48 PM

Post #2 of 2 (182 views)
Permalink
Re: Counting occurrence of text on a lucene index [In reply to]

See IndexReader#docFreq(Term)
Btw. You should ask those questions on the java-users list

Simon

On Nov 6, 2009 1:35 PM, "aionius" <aionius [at] gmail> wrote:


Good day to all.

I'm trying Lucene and so far I've managed to create an index, query and get
the result.
I just have some few questions. How can I get the number of occurrences of
the query string
on my index? For example, I'm searching for the word "hyperspace" on my
indices, Lucene
found it on pages 5, 6, and 8. Now I want to know how many times the word
"hyperspace"
was found on each of those pages.

Is this possible in Lucene?

Any help would be appreciated.


--
View this message in context:
http://old.nabble.com/Counting-occurrence-of-text-on-a-lucene-index-tp26230903p26230903.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.