Really strange to me: the cause should be what Shawn already pointed
out, because that error is raised when:
SchemaField sf = req.getSchema().getFieldOrNull(field);
....
is null:
if (null == sf) {
...
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "sort
param field can't be found: " + field);
}
So it seems Solr doesn't find the "name_sort" field in the schema, as
you changed that (the schema) without reloading / restarting.
Andrea
On 04/15/2015 09:30 AM, Pedro Figueiredo wrote:
Hello,
http://localhost:8983/solr/patientsCollection/select?q=*%3A*&sort=name_sort+asc&wt=json&indent=true&_=1429082874881
I am using the solr console admin and in the "query" option I just define the field sort
with "name_sort asc".
Pedro Figueiredo
Senior Engineer
pjlfigueir...@criticalsoftware.com
M. 934058150
Rua Engº Frederico Ulrich, nº 2650 4470-605 Moreira da Maia, Portugal
T. +351 229 446 927 | F. +351 229 446 929
www.criticalsoftware.com
PORTUGAL | UK | GERMANY | USA | BRAZIL | MOZAMBIQUE | ANGOLA
A CMMI® LEVEL 5 RATED COMPANY CMMI® is registered in the USPTO by CMU"
-----Original Message-----
From: Andrea Gazzarini [mailto:a.gazzar...@gmail.com]
Sent: 14 April 2015 19:47
To: solr-user@lucene.apache.org
Subject: Re: sort by a copy field error
Hi Pedro
Please post the request that produces that error
Andrea
On 14 Apr 2015 19:33, "Pedro Figueiredo" <pjlfigueir...@criticalsoftware.com>
wrote:
Hello,
I have a pretty basic question: how can I sort by a copyfield?
My schema conf is:
<field name="name" type="text_general_edge_ngram" indexed="true"
stored="true" omitNorms="true" termVectors="true"/>
<field name="name_sort" type="string" indexed="true" stored="false"/>
<copyField source="name" dest="name_sort" />
And when I try to sort by "name_sort" the following error is raised:
"error": {
"msg": "sort param field can't be found: name_sort",
"code": 400
}
Thanks in advanced,
Pedro Figueiredo