How to have Solr autocomplete on whole phrase when query contains multiple terms?

后端 未结 3 1853
离开以前
离开以前 2021-01-30 12:12

I\'ve looked through a ton of examples and other questions here and from them, I\'ve got my config very close to what I need but I\'m missing one last little bit that I\'m havin

3条回答
  •  生来不讨喜
    2021-01-30 12:28

    You may use the AnalyzingInfixLookupFactory or FreeTextLookupFactory

    • AnalyzingInfixLookupFactory returns the entire content of the field.
    • FreeTextLookupFactory returns a defined number of tokens.

    More details and other suggester algorithms you will find here: http://alexbenedetti.blogspot.de/2015/07/solr-you-complete-me.html

    Solr Configuration

    
      AnalyzingInfixSuggester
      AnalyzingInfixLookupFactory 
      DocumentDictionaryFactory
      title
      price
      text_en
    
    
    
      FreeTextSuggester
      FreeTextLookupFactory 
      DocumentDictionaryFactory
      title
      3
       
      text_general
    
    

提交回复
热议问题