How to boost search based on index type in elasticsearch or lucene?

后端 未结 4 2117
逝去的感伤
逝去的感伤 2021-01-04 11:49

I have three food type indices \"Italian\", \"Spanish\", \"American\". When the user searches \"Cheese\", documents from \"Italian\" appear to come up at the top. Is it poss

4条回答
  •  太阳男子
    2021-01-04 12:17

    For query-time boosting, queries (ex. query string) generally have a boost attribute you can set. Alternatively, you can wrap queries in a custom boost factor. I would probably prefer the former, usually.

提交回复
热议问题