Hmmm... if query by your unique key field is killing your performance, maybe
you have some larger problem to address. How bad is it? Are you using the
string field type? How long are your ids?
The only thing the real-time GET API gives you is more immediate access to
recently added, uncommitted data. Accessing older, committed data will be no
faster. But if accessing that recent data is what you are after, real-time
GET may do the trick.
I don't recall seeing changes to add it to SolrJ.
Realtime Get:
http://searchhub.org/2011/09/07/realtime-get/
-- Jack Krupansky
-----Original Message-----
From: Brian Hurt
Sent: Monday, March 18, 2013 6:08 PM
To: solr-user@lucene.apache.org
Subject: Help getting a document by unique ID
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