On 6/10/2019 3:26 PM, Dave Beckstrom wrote:
I have a field called metatag.date that is field-type: org.apache.solr.schema.TextField The field is being populated by NUTCH, which grabs the date from the html:
<snip>
I'm trying to sort by date (metatag.date desc) passed on the URL and it's not working.
In general, sorting by a field using the TextField class is probably not going to do what you think it will.
Can you share the full field definition in the schema, and the fieldType definition for the type used in the field definition?
Probably what you'll need to do is copyField that to another field that's using the StrField class (usually defined as "string" in most schemas), and ensure it has docValues turned on. For sorting, you could make it indexed="false" and stored="false" -- just enable docValues.
Thanks, Shawn