You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Maurice Coyle <ma...@ucd.ie> on 2003/07/21 21:18:04 UTC
problems extracting documents using Terms
hi all,
i'm trying to extract a document number from my lucene index using (where
read is an IndexReader)
TermDocs td = read.termDocs(new Term("url", someurl));
This call never returns any results, despite the fact that i definitely know
that a document with the url field equal to someurl exists in the index
(because i know the document in the index's document number and the code:
Document d=read.document(docnum);
System.out.println(d.get("url"));
outputs the String someurl).
i don't know what's going on, hopefully i've included enough information for
someone to spot what's up.
thanks very much,
maurice
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: problems extracting documents using Terms
Posted by maurits van wijland <m....@quicknet.nl>.
Maurice,
Please look at the tool Luke,
http://www.getopt.org/luke
And that can help you see into your index.
Maybe there is some trouble with spaces
or trimming of strings...but Luke can help
you there!
Good luck,
Maurits
----- Original Message -----
From: "Maurice Coyle" <ma...@ucd.ie>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Monday, July 21, 2003 9:18 PM
Subject: problems extracting documents using Terms
> hi all,
>
> i'm trying to extract a document number from my lucene index using (where
> read is an IndexReader)
> TermDocs td = read.termDocs(new Term("url", someurl));
>
> This call never returns any results, despite the fact that i definitely
know
> that a document with the url field equal to someurl exists in the index
> (because i know the document in the index's document number and the code:
>
> Document d=read.document(docnum);
> System.out.println(d.get("url"));
>
> outputs the String someurl).
>
> i don't know what's going on, hopefully i've included enough information
for
> someone to spot what's up.
>
> thanks very much,
> maurice
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org