Solr wrong sort text fields

后端 未结 1 778
孤独总比滥情好
孤独总比滥情好 2021-01-17 13:16

I have \"text_general\" field in schema.xml


    

        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-17 13:35

    Sorting doesn't work good on multivalued and tokenized fields.
    As testata has been defined with text_general field type, it will be tokensized and hence the sort would not work fine.

    Sorting can be done on the "score" of the document, or on any multiValued="false" indexed="true" field provided that field is either non-tokenized (ie: has no Analyzer) or uses an Analyzer that only produces a single Term (ie: uses the KeywordTokenizer)

    Source: http://wiki.apache.org/solr/CommonQueryParameters#sort

    Use string as the field type and copy the title field into the new field.

    
    
      
    

    0 讨论(0)
提交回复
热议问题