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 Henrib <hb...@gmail.com> on 2008/07/31 12:47:52 UTC

Filtering through list of document unique keys & keeping that order

I'm re-adapting some pretty-old/hacked (1.2dev) code that performs a query
filtered by a list of document unique keys and returning results based on
the list order. Anyone having same requirement/feature/code ?

I've been looking in QueryComponent where there is code to handle shards
that performs at least the first half (aka filter by the list of ids) and
wondering if adapting that code would be a reasonable way to get a "clean"
version of the feature.

Is this feature generic enough to submit a QueryComponent patch or should I
keep this separate ?

The list of unique keys is obtained from a concatenated list of ids; in my
case, I already have a 'String[]' enumerating these unique keys. The request
context seems the proper way to "inject" that list as is but would
abstracting/completing the 'params.get(ShardParams.IDS)' with a
'getContext().get("org.apache.solr.common.params.ShardParams.ids") - where
the latter would be the String[]' version - an acceptable generic solution
to pass arbitrary params ?

Any hints at how the 'sort' specification {c,sh}ould be described or should
that be implied somehow through the context parameters?

Any advice welcome.
Thanks.

PS: As a side-note, I'm not sure I understand correctly but it seems
DocSlice is performing in N2 complexity (the boolean exists() {} is going to
be called for each doc and it is scanning the list for each one...).
-- 
View this message in context: http://www.nabble.com/Filtering-through-list-of-document-unique-keys---keeping-that-order-tp18751975p18751975.html
Sent from the Solr - User mailing list archive at Nabble.com.