On Fri, Mar 11, 2011 at 5:58 PM, onlinespend...@gmail.com
<onlinespend...@gmail.com> wrote:
> what's the quickest and most efficient way to access a doc by its primary
> key? suppose I already know a document's unique id and simply want to fetch
> it without issuing a sophisticated query.

Bypassing the normal lucene query parser does give a speed up.

If you're id field is of type string, try the "raw" query parser, or
if you're on trunk, try the "term" query parser for other field types
(like numerics) that need a translation from external to internal
format.

Example: q={!raw f=id}MYDOCUMENTID

-Yonik
http://lucidimagination.com

Reply via email to