Can you send us what you're trying? It definitely should not be slow. Do
you have a lot or large stored fields that you're trying to retrieve?
Unless you're doing the transaction log / near-real-time stuff, here's how I'd
get a document by id:
/select?q={!term f=id}<document id>
The reason the {!term} stuff is there is to avoid any query parsing escaping
madness. If you simply did q=id:<id> you'd have to deal with escaping and
other query parser headaches.
Erik
On Mar 18, 2013, at 15:08 , Brian Hurt wrote:
> So here's the problem I'm trying to solve: in my use case, all my
> documents have a unique id associated with them (a string), and I very
> often need to get them by id. Currently I'm doing a search on id, and
> this takes long enough it's killing my performance. Now, it looks
> like there is a GET call in the REST interface which does exactly what
> I need, but I'm using the solrj interface.
>
> So my two questions are:
>
> 1. Is GET the right function I should be using? Or should I be using
> some other function, or storing copies of the documents some where
> else entirely for fast id-based retrieval?
>
> 2. How do I call GET with solrj? I've googled for how to do this, and
> haven't come up with anything.
>
> Thanks.
>
> Brian