lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramesh kumar Velusamy <ramesh...@gmail.com>
Subject Solr sorting issue : can not sort on multivalued field
Date Tue, 06 Dec 2011 12:52:47 GMT
Hi,

  I am getting this weird error message  `can not sort on multivalued
field: fieldname` on all the indexed fields. This is the full error message
from solr

     </head><body><h1>HTTP Status 400 - can not sort on multivalued field:
price</h1><hr/><p><b>type</b> Status report</p><p><b>message</b>can
not
sort on multivalued field: price</p><p><b>description</b>The request
sent
by the client was syntactically incorrect (can not sort on multivalued
field: price).</p><hr/><h3>GlassFish Server Open Source Edition
3.1</h3></body></html>

I am sure that my indexed field doesnt have `multiValued=true` set on

        <field name="price" type="float" indexed="true" stored="true"
multivalued="false" />

to make sure that i have added `multiValued=false`, but i am still getting
the same error.

This is the URL request sent to solr


http://localhost:8080/apache-solr-3.1.0/select?wt=ruby&q=flat&fl=_id&sort=price+asc&limit=5&offset=0

It all works fine if i remove the sort from the request.


Here the complete stack-trace from solr log


[#|2011-12-06T16:03:35.813+0530|SEVERE|glassfish3.1|org.apache.solr.core.SolrCore|_ThreadID=22;_ThreadName=Thread-1;|org.apache.solr.common.SolrException:
can not sort on multivalued field: price
    at
org.apache.solr.schema.SchemaField.checkSortability(SchemaField.java:161)
    at org.apache.solr.schema.TrieField.getSortField(TrieField.java:128)
    at org.apache.solr.schema.SchemaField.getSortField(SchemaField.java:144)
    at org.apache.solr.search.QueryParsing.parseSort(QueryParsing.java:385)
    at org.apache.solr.search.QParser.getSort(QParser.java:251)
    at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:102)
    at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
    at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
    at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
    at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)
    |#]


[#|2011-12-06T16:03:35.814+0530|INFO|glassfish3.1|org.apache.solr.core.SolrCore|_ThreadID=22;_ThreadName=Thread-1;|[]
webapp=/apache-solr-3.5.0 path=/select
params={wt=ruby&q=flat&fl=_id&sort=price+asc&limit=5&offset=0} status=400
QTime=42 |#]


PS: I do have only one multivalued field in the document, but thats not
used in the sort. And i have verified in both the solr versions 3.1 and
3.5. same error.

 Can some one help me out..

Cheers
Ramesh vel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message