lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil Kumar PK" <pksuni...@gmail.com>
Subject How to improve document retrieval speed.
Date Sat, 04 Nov 2006 11:46:28 GMT
Hi,

In my index there is a unique field, "MY_DOCNO".

If I want get a document from the index with MY_DOCNO=1000,  I am using
following code,

IndexSearcher isearcher = new IndexSearcher("myindex1");
QueryParser qp = new QueryParser("MY_DOCNO", new StandardAnalyzer());

Query query = qp.parse("MY_DOCNO:1000");
Hits hits = isearcher.search(query);

Since I have a unique field in my index, is there any other method, that can
retrieve the document faster than this?

Thanks,
Sunil

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message