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 tedsolr <ts...@sciquest.com> on 2016/07/26 18:47:46 UTC

Search sort depth limited to 4?

Hi, I'm trying to group search results by fields using the streaming API. I
don't see a sort limit mentioned in the Solr Ref Doc, but when I use 4
fields I get results and when I use 5 or more I get an exception:

java.util.concurrent.ExecutionException: java.io.IOException:
JSONTupleStream: expected OBJECT_START but got STRING

I've got to be able to group docs by an unlimited number of like fields
(well, at least up to 20), which requires sorting the stream. Is there a
limit to the number of sort params in a single search?

thanks!
Ted
v5.2.1



--
View this message in context: http://lucene.472066.n3.nabble.com/Search-sort-depth-limited-to-4-tp4289049.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Search sort depth limited to 4?

Posted by Joel Bernstein <jo...@gmail.com>.
Yes, currently there is the 4 sort field limit. A custom handler could be
built that allows for unlimited sorts or you could provide a patch to the
export handler.

I think though that you'll find that performance drops off quite a bit as
the number of sort fields increases. This is because each field needs to be
retrieved from the docValues cache in order to perform the sort.

Joel Bernstein
http://joelsolr.blogspot.com/

On Tue, Jul 26, 2016 at 2:58 PM, tedsolr <ts...@sciquest.com> wrote:

> So I found the limit in the Ref Doc p. 394, under the /export request
> handler:
>
> "Up to four sort fields can be specified per request, with the 'asc' or
> 'desc' properties"
>
> Yikes I'm in trouble. Does anyone know if this can be circumvented? Can I
> write a custom handler that could handle up to 20? Oh boy.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Search-sort-depth-limited-to-4-tp4289049p4289053.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Search sort depth limited to 4?

Posted by tedsolr <ts...@sciquest.com>.
So I found the limit in the Ref Doc p. 394, under the /export request
handler:

"Up to four sort fields can be specified per request, with the 'asc' or
'desc' properties"

Yikes I'm in trouble. Does anyone know if this can be circumvented? Can I
write a custom handler that could handle up to 20? Oh boy.



--
View this message in context: http://lucene.472066.n3.nabble.com/Search-sort-depth-limited-to-4-tp4289049p4289053.html
Sent from the Solr - User mailing list archive at Nabble.com.