You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Arjun Dhar <dh...@yahoo.com> on 2013/06/03 11:28:47 UTC

Unable to sort when using a multiCollector

I have a DrillDownQuery for taxonomy Search (Category path based search)
The following works beautifully:


However there is no Constructor or method arguments to allow sorting; so I
did:

...which throws some rubbish.

I have followed all the rules for Indexing for sorting etc. (On a Numeric
Field). The one with the collector is bang on accurate but the one with the
sort is going wonky.

Can anyone help on this?





--
View this message in context: http://lucene.472066.n3.nabble.com/Unable-to-sort-when-using-a-multiCollector-tp4067753.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Unable to sort when searching with a MultiCollector

Posted by Arjun Dhar <dh...@yahoo.com>.
ok managed to FIX it! :) 

Too a Q from
http://lucene.472066.n3.nabble.com/sort-by-field-and-score-td4022541.html

So without sort the code that always worked was:
Assume : facetsCollector - Defined


With Sort: (Use *TopFieldCollector*)




--
View this message in context: http://lucene.472066.n3.nabble.com/Unable-to-sort-when-searching-with-a-MultiCollector-tp4067753p4067764.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Unable to sort when searching with a MultiCollector

Posted by Arjun Dhar <dh...@yahoo.com>.
I have also observed, that when using the TopDocsCollector version of the
Query, if the hits exceed the the number of actual results, it returns
nothing.

In the case of  of plain .search(query, hits, sort); the damn thing keeps
going on n on. If i give an absurd number of hits, it wont stop.



--
View this message in context: http://lucene.472066.n3.nabble.com/Unable-to-sort-when-searching-with-a-MultiCollector-tp4067753p4067761.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Unable to sort when using a multiCollector

Posted by Michael McCandless <lu...@mikemccandless.com>.
On Mon, Jun 3, 2013 at 5:28 AM, Arjun Dhar <dh...@yahoo.com> wrote:
> I have a DrillDownQuery for taxonomy Search (Category path based search)
> The following works beautifully:
>
> However there is no Constructor or method arguments to allow sorting; so I
> did:
>
> ...which throws some rubbish.

I don't see any code in there :)

But using MultiCollector with DrillDownQuery ought to work fine.

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org