Re: number of term occurrences

2006-10-25 Thread beatriz ramos
ilto:[EMAIL PROTECTED] Envoyé: mardi, 24. octobre 2006 12:30 Ŕ: java-user Objet: Re: number of term occurrences Hi, I have tried this options too and the Term Vector return null. Which do you think that it is the problem? 2006/10/24, beatriz ramos <[EMAIL PROTECTED]>: > >

Re: number of term occurrences

2006-10-24 Thread Doron Cohen
I don't know why the termDocs option did not work for you. Perhaps you did not (re)open the searcher after the index was populated? Anyhow, here is a small code snippet that does just this, see if it works for you, then you can compare it to your code... void numberOfTermOcc() throws Exception

Re: number of term occurrences

2006-10-24 Thread Tricia Williams
When you create a Document by adding Field(s) (http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Field.html) consider the last constructor which allows you to specify if the the field will have its TermVector stored or not stored. Also, Luke has a column in its document view wh

Re: number of term occurrences

2006-10-24 Thread Paz Belmonte
De: Paz Belmonte [mailto:[EMAIL PROTECTED] Envoyé: mardi, 24. octobre 2006 12:30 Ŕ: java-user Objet: Re: number of term occurrences Hi, I have tried this options too and the Term Vector return null. Which do you think that it is the problem? 2006/10/24, beatriz ramos &

RE: number of term occurrences

2006-10-24 Thread Samir Abdou
Hi, You indexed without storing vectors! This is why the term vector is null. Samir -Message d'origine- De : Paz Belmonte [mailto:[EMAIL PROTECTED] Envoyé : mardi, 24. octobre 2006 12:30 À : java-user Objet : Re: number of term occurrences Hi, I have tried this options too an

Re: number of term occurrences

2006-10-24 Thread Paz Belmonte
Hi, I have tried this options too and the Term Vector return null. Which do you think that it is the problem? 2006/10/24, beatriz ramos <[EMAIL PROTECTED]>: -- Forwarded message -- From: beatriz ramos <[EMAIL PROTECTED]> Date: 24-Oct-2006 11:24 Subject: Re: nu

Re: number of term occurrences

2006-10-24 Thread beatriz ramos
Hi, thanks for all your answers, but they don't work I have tried the 3 options and with all of them we get termDoc = 0 I have checked my index with Luke software and termDoc is 1 here, so my index is correct. is it possible I have a problem with the reader? (because my index is allright) Thank

Re: number of term occurrences

2006-10-23 Thread Grant Ingersoll
You can also use Term Vectors, at the cost of extra storage. Search this list for Term Vectors for info on how to implement. On Oct 23, 2006, at 5:50 AM, beatriz ramos wrote: Hello, I´m working with Lucene. I need to get the number of occurrences of the term in the document. I had seen the

Re: number of term occurrences

2006-10-23 Thread Erick Erickson
Yeah, but I haven't used the termfreq thingy enough to think of it automatically ... Besides, I'm learning that if I put a fooliwh answer out there, someone'll correct me. Thanks Erick On 10/23/06, Paul Elschot <[EMAIL PROTECTED]> wrote: On Monday 23 October 2006 21:16, Erick Erickson wrote: >

Re: number of term occurrences

2006-10-23 Thread Paul Elschot
On Monday 23 October 2006 21:16, Erick Erickson wrote: > Use TermDocs.seek(Term) to get to the term. That'll position your TermDocs > variable at a list, ordered by document ID of the ocurrences of a term. Then > TermDocs.skipTo(doc ID) will get you to the list of terms for that document > (you hav

Re: number of term occurrences

2006-10-23 Thread Erick Erickson
Use TermDocs.seek(Term) to get to the term. That'll position your TermDocs variable at a list, ordered by document ID of the ocurrences of a term. Then TermDocs.skipTo(doc ID) will get you to the list of terms for that document (you have to know what Lucene DocId you care about here.). Now TermDo