lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Nioche" <Julien.Nio...@lingway.com>
Subject Re: [FAQ] Finding number of occurrences of a given word in a document
Date Tue, 08 Jul 2003 07:43:52 GMT
There was a discussion about this feature (see
:http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg00101.html)
but there's is actually no way to do this. You'll have to make some
modifications on the source code to implement this feature.

Julien


----- Original Message -----
From: "none none" <korfut@lycos.com>
To: <lucene-dev@jakarta.apache.org>
Sent: Monday, July 07, 2003 6:20 PM
Subject: Re: [FAQ] Finding number of occurrences of a given word in a
document


> So, is there a way to know the number of occurrences after running a
PhraseQuery?
> thank you very much.
>
> --
>
> --------- Original Message ---------
>
> DATE: Mon, 7 Jul 2003 09:32:22
> From: "Julien Nioche" <Julien.Nioche@lingway.com>
> To: "Lucene Developers List"
<lucene-dev@jakarta.apache.org>,<korfut@lycos.com>
> Cc:
>
> >No, TermDocs operates only on Terms, not on PhraseQueries. A PhraseQuery
is
> >.... a query and is not stored in an index.
> >
> >----- Original Message -----
> >From: "none none" <korfut@lycos.com>
> >To: "Lucene Developers List" <lucene-dev@jakarta.apache.org>
> >Sent: Monday, July 07, 2003 7:00 AM
> >Subject: Re: [FAQ] Finding number of occurrences of a given word in a
> >document
> >
> >
> >> hi,
> >> will this work for a PhraseQuery and with slop>1?
> >> thank you
> >>
> >> --
> >>
> >> --------- Original Message ---------
> >>
> >> DATE: Fri, 31 Jan 2003 09:12:05
> >> From: Kelvin Tan <kelvin-lists@relevanz.com>
> >> To: Lucene Developers List <lucene-dev@jakarta.apache.org>
> >> Cc:
> >>
> >> >Yep. Here's some sample code for those who aren't sure how to use
Term,
> >> >TermDocs...
> >> >
> >> >        IndexReader reader = IndexReader.open("c:/index");
> >> >        String value = "foobar";
> >> >        Term t = new Term(field, value);
> >> >        TermDocs termDocs = reader.termDocs(t);
> >> >        try
> >> >        {
> >> >            while (termDocs.next())
> >> >            {
> >> >                int docNumber = termDocs.doc();
> >> >                Document doc = reader.document(docNumber);
> >> >                System.out.println("Document:" + doc + " has " +
> >> >termDocs.freq() + " occurences of " + value);
> >> >            }
> >> >        }
> >> >        finally
> >> >        {
> >> >            if (termDocs != null) termDocs.close();
> >> >        }
> >> >
> >> >HTH
> >> >
> >> >Regards,
> >> >Kelvin
> >> >
> >> >--------
> >> >The book giving manifesto     - http://how.to/sharethisbook
> >> >
> >> >
> >> >On Thu, 30 Jan 2003 05:56:55 -0800 (PST), Otis Gospodnetic said:
> >> >>Would this be the correct answer?
> >> >>http://www.mail-archive.com/lucene-
> >> >>user@jakarta.apache.org/msg01738.html
> >> >>
> >> >>I haven't tested it...
> >> >>
> >> >>Otis
> >> >>
> >> >>--- Kelvin Tan <kelvin-lists@relevanz.com> wrote:
> >> >>>Maybe this is a good FAQ entry, under Searching?
> >> >>>
> >> >>>
> >> >>http://www.mail-archive.com/lucene-
> >> >>user@jakarta.apache.org/msg01735.html
> >> >>>
> >> >>>Regards, Kelvin
> >> >>>
> >> >>>--------
> >> >>>The book giving manifesto     - http://how.to/sharethisbook
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>--------------------------------------------------------------------
> >> >>>-
> >> >>>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> >> >>>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> >> >>>
> >> >>
> >> >>
> >> >>__________________________________________________ Do you Yahoo!?
> >> >>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> >> >>http://mailplus.yahoo.com
> >> >>
> >> >>
> >> >>---------------------------------------------------------------------
> >> >>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> >> >>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> >> >
> >> >
> >> >
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> >> >For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> ____________________________________________________________
> >> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> >> http://login.mail.lycos.com/r/referral?aid=27005
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> >>
> >>
> >
> >
>
>
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>


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


Mime
View raw message