You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sorting feature has a fundamental issue, due to the wrong field type specified in the copyfield directive for the field "*_sorting". This causes unexpected and seemingly irrational behaviour of the sorting form or the order of the resultset respectivly.
As long as a metadata is just a single token or value, the sorting works as expecte. As soon as it consists of more than one token it fails to sort properly.
According to the SOLR-Documentation sortable fields are "score", not multivalued, single tokens (likewise analyzed with the keywordTokenizer), from a function or fundamental fieldtypes like string, int, bool. (https://solr.apache.org/guide/8_11/common-query-parameters.html#sort-parameter). Sorting does not work properly, when it's an analyzed field.
In the schema.xml the copyfield uses the "standard" fieldtype, that has its whole analyzerchain: <dynamicField name="*_sorting" type="standard" stored="true" indexed="true" multiValued="false" />
When it actually should be a string: <dynamicField name="*_sorting" type="string" stored="true" indexed="true" multiValued="false" />
Changing this would lead to the necessity of creating a fresh core and re-indexing all documents into it. Otherwise SOLR would log errors because of missmatching fieldtypes.
The text was updated successfully, but these errors were encountered:
Description
The sorting feature has a fundamental issue, due to the wrong field type specified in the copyfield directive for the field "*_sorting". This causes unexpected and seemingly irrational behaviour of the sorting form or the order of the resultset respectivly.
As long as a metadata is just a single token or value, the sorting works as expecte. As soon as it consists of more than one token it fails to sort properly.
According to the SOLR-Documentation sortable fields are "score", not multivalued, single tokens (likewise analyzed with the keywordTokenizer), from a function or fundamental fieldtypes like string, int, bool. (https://solr.apache.org/guide/8_11/common-query-parameters.html#sort-parameter). Sorting does not work properly, when it's an analyzed field.
In the schema.xml the copyfield uses the "standard" fieldtype, that has its whole analyzerchain:
<dynamicField name="*_sorting" type="standard" stored="true" indexed="true" multiValued="false" />
When it actually should be a string:
<dynamicField name="*_sorting" type="string" stored="true" indexed="true" multiValued="false" />
Changing this would lead to the necessity of creating a fresh core and re-indexing all documents into it. Otherwise SOLR would log errors because of missmatching fieldtypes.
The text was updated successfully, but these errors were encountered: