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 Marc Sturlese <ma...@gmail.com> on 2009/06/10 09:52:18 UTC

SortedIntDocSet vs HashDocSet

I use to have a HashDocSet in my own Solr SearchComponent. As HashDocSet is
not used anymore in recent nightlies could I replace it for a
SortedIntDocSet (it didn't exist yet when I create my search component).
Does it make sense?

And another thing... Is there anyway to get a set of internal document id's
sorted by relevance without using a DocList,
I mean, I am doing:

DocList docs = searcher.getDocList(query, filters, sort, 0, maxDocs, flags); 
I do this before executing the normal query, so, I am experiencing some bad
performance. Maybe would help something like:

DocSet docs = searcher.getXXX(query, filters, sort, 0, maxDocs, flags); 
Could this would be faster? Is there any way to do that?

Thanks in advance
-- 
View this message in context: http://www.nabble.com/SortedIntDocSet-vs-HashDocSet-tp23957473p23957473.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SortedIntDocSet vs HashDocSet

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Jun 10, 2009 at 3:52 AM, Marc Sturlese <ma...@gmail.com> wrote:
> I use to have a HashDocSet in my own Solr SearchComponent. As HashDocSet is
> not used anymore in recent nightlies could I replace it for a
> SortedIntDocSet (it didn't exist yet when I create my search component).
> Does it make sense?

Yep.  Make sure the ids you pass are sorted.  I'll update the javadoc
for the class.

> And another thing... Is there anyway to get a set of internal document id's
> sorted by relevance without using a DocList,

Nope... DocSets are either unordered (HashDocSet) or ordered by the
internal docid - there's no way to record a different ordering.
That's what DocList is for.

-Yonik
http://www.lucidimagination.com