Re: access document by primary key

2012-05-03 Thread Yonik Seeley
On Thu, May 3, 2012 at 3:01 PM, Tomás Fernández Löbbe
 wrote:
> Is this still true? Assuming that I know that there hasn't been updates or
> that I don't care to see a different version of the document, are the term
> QP or the raw QP faster than the real-time get handler?

Sort of different things... query parsers only parse queries, not execute them.
If you're looking for documents by ID though, the realtime-get hander
should be the fastest, esp in a distributed setup.

-Yonik
lucenerevolution.com - Lucene/Solr Open Source Search Conference.
Boston May 7-10


Re: access document by primary key

2012-05-03 Thread Tomás Fernández Löbbe
Is this still true? Assuming that I know that there hasn't been updates or
that I don't care to see a different version of the document, are the term
QP or the raw QP faster than the real-time get handler?

On Fri, Mar 11, 2011 at 3:12 PM, Yonik Seeley wrote:

> On Fri, Mar 11, 2011 at 5:58 PM, 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
>


Re: access document by primary key

2011-03-11 Thread Yonik Seeley
On Fri, Mar 11, 2011 at 5:58 PM, 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


access document by primary key

2011-03-11 Thread onlinespend...@gmail.com
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.

Thanks,
Ben