You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Jean-Albert <we...@mapeo.eu> on 2008/02/15 11:57:34 UTC
Retrieving a document from a "keyword" field
Hello all,
The documents of my (mysql) database are indexed by Lucene, and I save (as a
"Keyword") the database id in the "internal_id" field of the Lucene
document.
If a search my Lucene index, I can read the internal_id and instanciante the
object from the database. Good.
But now I want to know if an object in my database is indexed yet, so I try
to search the following query :
internal_id:399 (399 is the id in the database) , with the hope to get from
Lucene the document having 399 in the internal_id field.
But I get no results. Impossible to retrieve this document...
Do I misunderstood how to search a specific field ?
JA
--
View this message in context: http://www.nabble.com/Retrieving-a-document-from-a-%22keyword%22-field-tp15498933p15498933.html
Sent from the Lucene - General mailing list archive at Nabble.com.
RE: Retrieving a document from a "keyword" field
Posted by Steven A Rowe <sa...@syr.edu>.
Hi JA,
The "general@l.a.o" list has fewer subscribers than "java-user@l.a.o", so in the future, I would recommend going there for questions like these.
On 02/15/2008 at 5:57 AM, Jean-Albert wrote:
> I try to search the following query : internal_id:399
> (399 is the id in the database) , with the hope to get from
> Lucene the document having 399 in the internal_id field.
>
> But I get no results. Impossible to retrieve this document...
>
> Do I misunderstood how to search a specific field ?
Can you show the code you're using to search? My guess is that the analyzer being used is stripping numeric terms, resulting in an empty query.
Steve