Help please with 'Error searching Solr index' - 'Missing sort order'

316 views
Skip to first unread message

Chris

unread,
Aug 14, 2013, 10:54:59 AM8/14/13
to isla...@googlegroups.com
Hi folks,

I'm setting up a site (v 7) and running into some difficulties with getting the solr search to work and would love any insight/pointers anyone here could send my way.

I can connect fine ('Successfully connected to Solr server at...') and I've made various settings for sort (dc.title), facet, advanced search block, query defaults (no NS restriction, *:*, dc.title), required solr fields, and other. However, when I go to do do a search on this site (http://unbound.williams.edu/communications/islandora/search/?type=dismax) I get 'Error searching Solr index "400" Status: Bad Request' and 'Error searching Solr index.'. When I look at the logs I see this error message:

    Aug 14, 2013 10:44:01 AM org.apache.solr.common.SolrException log
    SEVERE: org.apache.solr.common.SolrException: Missing sort order.
            at org.apache.solr.search.QueryParsing.parseSort(QueryParsing.java:254)
            at org.apache.solr.search.QParser.getSort(QParser.java:211)
            at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:90)
            at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
            at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
            at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
            at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
            at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
            at java.lang.Thread.run(Thread.java:662)

    Aug 14, 2013 10:44:01 AM org.apache.solr.core.SolrCore execute
    INFO: [] webapp=/solr path=/select params={facet=true&sort=dc.title&facet.mincount=2&facet.limit=20&json.nl=map&wt=json&rows=20&version=1.2&start=0&q=*:*&facet.field=dc.title&qt=standard&fq=rels.isViewableByUser:"cwarren"+OR+rels.isViewableByRole:"authenticated+user"+OR+rels.isViewableByRole:"administrator"+OR+((*:*+-rels.isViewableByUser:[*+TO+*])+AND+(*:*+-rels.isViewableByRole:[*+TO+*]))} status=400 QTime=2


I'm especially confused because the error message says 'Missing sort order' while the params include '&sort=dc.title&'.

Any thoughts/guidance on what's going wrong and what I might try to fix it?

    Thanks

        -Chris Warren
        Williams College

David Wilcox

unread,
Aug 14, 2013, 12:15:43 PM8/14/13
to islandora
Hi Chris,

I'm pretty sure it's breaking because dc.title is a multi-valued field (i.e. you can have more than one dc.title field per object) and sort only works on single-valued fields (e.g. created date,date last modified, etc.). I think you could index dc.title (or a copy of that field) as single valued by setting the multiValued="true" attribute to false for that field in your Solr schema.

Hope that helps,

David


--
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Adam Vessey

unread,
Aug 14, 2013, 12:34:01 PM8/14/13
to isla...@googlegroups.com
I don't think this one is due to being multi-valued (though that could also be the next error encountered). As the error says, it's missing the sort order. In the "Sort field" in the "query defaults", the default order should also be indicated--either "asc" for ascending or "desc" for descending order.

So, for "dc.title" (assuming that it is a single-valued field), "dc.title asc" would make the results sort on title in ascending order.

- Adam

Chris

unread,
Aug 14, 2013, 1:22:58 PM8/14/13
to isla...@googlegroups.com
That fixed it!!!

No problems with the multi-value thing.

Much thanks!

-Chris
>> <http://json.nl>=map&wt=json&rows=20&version=1.2&start=0&q=*:*&facet.field=dc.title&qt=standard&fq=rels.isViewableByUser:"cwarren"+OR+rels.isViewableByRole:"authenticated+user"+OR+rels.isViewableByRole:"administrator"+OR+((*:*+-rels.isViewableByUser:[*+TO+*])+AND+(*:*+-rels.isViewableByRole:[*+TO+*]))}
>> status=400 QTime=2
>>
>>
>> I'm especially confused because the error message says 'Missing
>> sort order' while the params include '&sort=dc.title&'.
>>
>> Any thoughts/guidance on what's going wrong and what I might try
>> to fix it?
>>
>> Thanks
>>
>> -Chris Warren
>> Williams College
>> -- You received this message because you are subscribed to
>> the Google
>> Groups "islandora" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to islandora+...@googlegroups.com
>> <mailto:islandora%2Bunsu...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages