multi-fields elasticsearch

It is often useful to index the same field in Elasticsearch in different ways, to serve different purposes, for example, mapping a POCO string property as a text datatype for full text search as well as mapping as a keyword datatype for structured search, sorting and aggregations. Another example is mapping a POCO string property to use different analyzers, to serve different full text search needs.

對一個field設置多種索引方式。用於不同的搜索場景。
例子:
multi-fields elasticsearch

使url field設置爲”text”類型用於進行全文檢索,同時又給它設置”keyword”類型用於排序或聚合。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章