Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 50797 invoked from network); 6 Nov 2009 22:48:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Nov 2009 22:48:55 -0000 Received: (qmail 29163 invoked by uid 500); 6 Nov 2009 22:48:54 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 29093 invoked by uid 500); 6 Nov 2009 22:48:54 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 29085 invoked by uid 99); 6 Nov 2009 22:48:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 22:48:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.willnauer@googlemail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 22:48:42 +0000 Received: by bwz22 with SMTP id 22so1916878bwz.5 for ; Fri, 06 Nov 2009 14:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=KIqSckkRKKAYVABGeW4hmRiGpdBgVN6QFS4YWb2FfZk=; b=SugvwFgXphIn6HH5GCJy+U00rHXivAEW82ufC1PBkhqF1Fp/UJCIYXZfADac/7Iir7 dT8dZUc9gsXi2xRLOQTTF34vDcXd1TfmZrNuWVUD3RQy9DoMbzrTN4P3qLohBKdwuhmr tJGI8dP1pEyEd57R5Ob624sTvUWRS31G/rGrk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=JoSCD2WutEW7pHHLyeRlz8qI1thu0wwxwCC9Tt9Ax035Q5pxPIdGe0gsCvYjkacz1Y +wf2HR49LpHUHEs4PP2CahwZC9gR0WsfCLddMsIR9LOgzFPJrw91zQUC47ZDQBGvacfy hNVZG7Iz980K/uPsurMxYvNy9AXsQp4tY+Jkw= MIME-Version: 1.0 Received: by 10.239.168.153 with SMTP id k25mr536115hbe.68.1257547702188; Fri, 06 Nov 2009 14:48:22 -0800 (PST) Reply-To: simon.willnauer@gmail.com In-Reply-To: <26230903.post@talk.nabble.com> References: <26230903.post@talk.nabble.com> Date: Fri, 6 Nov 2009 23:48:21 +0100 Message-ID: Subject: Re: Counting occurrence of text on a lucene index From: Simon Willnauer To: java-dev@lucene.apache.org Content-Type: multipart/alternative; boundary=001636498e6d13bbcf0477bba4dc X-Virus-Checked: Checked by ClamAV on apache.org --001636498e6d13bbcf0477bba4dc Content-Type: text/plain; charset=UTF-8 See IndexReader#docFreq(Term) Btw. You should ask those questions on the java-users list Simon On Nov 6, 2009 1:35 PM, "aionius" 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@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --001636498e6d13bbcf0477bba4dc Content-Type: text/html; charset=UTF-8

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@gmail.com> 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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org

--001636498e6d13bbcf0477bba4dc--