Solr Underline Tables

schema.xml (part related to my question):

<field name="question" stored="true" type="text" multiValued="false" indexed="true"/> <field name="question_highlight" stored="true" type="string" multiValued="false" indexed="true"/> </fields> <!-- AND --> <copyField source="question" dest="question_highlight" /> 

Notes: I have stop words for fieldType: text

When I index a document, I pass the question box now when I try to search for this query

 select?q=question:have fever&hl=true&hl.fl=question_highlight 

knowing that the word has been included in my stop-word list, the word has not been highlighted in the results. How can I fix this? I need to highlight stop words, I checked this Solr message , highlighting without stop words for phrases? , so I set question_highlight as a string, but it still doesn't work

+4
source share
1 answer

A simple solution would be to use the hl.q parameter in the highlight field when using the q on search field, which has StopFilter and hl.q

0
source

Source: https://habr.com/ru/post/1445272/


All Articles