Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2627991E9 for ; Tue, 6 Dec 2011 12:59:44 +0000 (UTC) Received: (qmail 66527 invoked by uid 500); 6 Dec 2011 12:59:40 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 66496 invoked by uid 500); 6 Dec 2011 12:59:40 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Delivered-To: moderator for solr-user@lucene.apache.org Received: (qmail 49727 invoked by uid 99); 6 Dec 2011 12:53:37 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rameshvel@gmail.com designates 209.85.214.48 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=WzmqgA9Md5ienw0Yqe6b7ym4z10RqgENcgkQVSPQMm4=; b=qBPS9/+oAWBi1yrHnyno49bELeWIXoLbpsN5cQg6lTSOyX+wlNWyvBODtYGjLrASp6 kDCGeD+SqjPjHVCg6lhOi0xtMtvQZa9rHaQaAtcCSFdPZrcaDGEGDAyj9Efky6ImxWTK X4CnO4tAlu/hd/vi3trqB/viQx7AYvYxXt794= MIME-Version: 1.0 From: Ramesh kumar Velusamy Date: Tue, 6 Dec 2011 18:22:47 +0530 Message-ID: Subject: Solr sorting issue : can not sort on multivalued field To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=f46d0435bffcd008fa04b36bea87 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0435bffcd008fa04b36bea87 Content-Type: text/plain; charset=ISO-8859-1 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

HTTP Status 400 - can not sort on multivalued field: price


type Status report

messagecan not sort on multivalued field: price

descriptionThe request sent by the client was syntactically incorrect (can not sort on multivalued field: price).


GlassFish Server Open Source Edition 3.1

I am sure that my indexed field doesnt have `multiValued=true` set on 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 --f46d0435bffcd008fa04b36bea87--