solr query with white space

后端 未结 5 1844
轻奢々
轻奢々 2020-12-05 22:54

I search for a word and I get the results with facet as follows:


108
&l         


        
5条回答
  •  盖世英雄少女心
    2020-12-05 23:44

    This doesn't answer this question directly but it may help with this problem:

    Remove the spaces before posting to Solr.

    For fields used for faceting rather than searching, it is not important to store the value with spaces. The value is simply a treated as key. Store the field itemtype like so:"supplychainintermediaries", "monitorauditorfirm", etc.

    When you display the facet values to the user, simply use a dictionary which maps key values to display values. Like so:

    "supplychainintermediaries" --> "Supply Chain Intermediaries" "monitorauditorfirm" --> "Monitor/Auditor Firm"

提交回复
热议问题