i have indexed files uisng IndexFiles,
how can i add the field to the document using this.
cheers,
trupti mulajkar
MSc Advanced Computer Science
Quoting karl wettin <[EMAIL PROTECTED]>:
>
> 2 maj 2006 kl. 16.11 skrev trupti mulajkar:
> >
> > doc(i).get("contents");
> >
> > i get an only NULL
Lucene's fields are case sensitive and I think "contents" is written in
lower case by default.
Cheers,
Frank
-Original Message-
From: trupti mulajkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 4:11 PM
To: java-user@lucene.apache.org
Subject: Re: creating ind
2 maj 2006 kl. 16.11 skrev trupti mulajkar:
doc(i).get("Contents");
i get an only NULL
any ideas ?
Did you index the field with term vector when you added it to the
document?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Try using luke to see how the document actually is in the index.
http://www.getopt.org/luke/
-Venu
-Original Message-
From: trupti mulajkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 7:41 PM
To: java-user@lucene.apache.org
Subject: Re: creating indexReader object
thanx
thanx hannes,
but i dont think i made my query clear enough.
i have created the index reader object just the way you mentioned it, but after
that when i try to do create the vectors like term frequency and document
frequency using
doc(i).get("Contents");
i get an only NULL
any ideas ?
cheer
Hi,
IndexReader has some static methods, e.g.
IndexReader reader = IndexReader.open(new File("/index"));
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexReader.html#open(java.lang.String)
Hannes
trupti mulajkar schrieb:
i am trying to create an object of index reader class
i am trying to create an object of index reader class that reads my index. i
need this to further generate the document and term frequency vectors.
however when i try to print the contents of the documents (doc.get("contents"))
it shows -null .
any suggestions,
if i cant read the contents then i c