You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sergey Bartunov <sb...@gmail.com> on 2010/10/11 15:30:52 UTC

Search within a subset of documents

Is it possible to use Solr for searching within a subset of documents
represented by enumeration of document IDs?

Re: Search within a subset of documents

Posted by Sergey Bartunov <sb...@gmail.com>.
And so I think. Actually I hope that I can do something like that:

1) tell the Solr to prepare for searching
2) start my very fast filtering routine
3) send asynchronoussly IDs of filtered documents to the Solr and
expect that Solr is ranging them in the parallel
4) get the result quickly

On 11 October 2010 21:25, Gora Mohanty <go...@mimirtech.com> wrote:
> On Mon, Oct 11, 2010 at 8:20 PM, Sergey Bartunov <sb...@gmail.com> wrote:
>> Whether it will be enough effective if the subset is really large?
> [...]
>
> If the subset of IDs is large, and disjoint (so that you cannot use ranges),
> the query might look ugly, but generating it should not be much of a
> problem if you are using some automated method to create the query.
>
> If you mean whether it will be efficient enough, the only way is to try
> it out, and measure performance. Offhand, I do not think that it should
> increase the query response time by a lot.
>
> Regards,
> Gora
>

Re: Search within a subset of documents

Posted by Gora Mohanty <go...@mimirtech.com>.
On Mon, Oct 11, 2010 at 8:20 PM, Sergey Bartunov <sb...@gmail.com> wrote:
> Whether it will be enough effective if the subset is really large?
[...]

If the subset of IDs is large, and disjoint (so that you cannot use ranges),
the query might look ugly, but generating it should not be much of a
problem if you are using some automated method to create the query.

If you mean whether it will be efficient enough, the only way is to try
it out, and measure performance. Offhand, I do not think that it should
increase the query response time by a lot.

Regards,
Gora

Re: Search within a subset of documents

Posted by Sergey Bartunov <sb...@gmail.com>.
Whether it will be enough effective if the subset is really large?

On 11 October 2010 18:39, Gora Mohanty <go...@mimirtech.com> wrote:
> On Mon, Oct 11, 2010 at 7:00 PM, Sergey Bartunov <sb...@gmail.com> wrote:
>> Is it possible to use Solr for searching within a subset of documents
>> represented by enumeration of document IDs?
>
> Couldn't you add the document ID to the query, e.g., if the field is
> called id, you can use ?q=id:<desired ID>, e.g., ?q=id:1234? You could
> use a range, etc., to include all the desired IDs.
>
> Regards,
> Gora
>

Re: Search within a subset of documents

Posted by Gora Mohanty <go...@mimirtech.com>.
On Mon, Oct 11, 2010 at 7:00 PM, Sergey Bartunov <sb...@gmail.com> wrote:
> Is it possible to use Solr for searching within a subset of documents
> represented by enumeration of document IDs?

Couldn't you add the document ID to the query, e.g., if the field is
called id, you can use ?q=id:<desired ID>, e.g., ?q=id:1234? You could
use a range, etc., to include all the desired IDs.

Regards,
Gora