Skip to content
欢迎扫码关注公众号

Elasticsearch Guid 字段使用 term 无法查询出来

Guid 字段格式为:EE7A6E30-CF98-497B-9906-E25790B03485

猜测是因为自动分词导致该字段无法完全匹配。

创建索引时应该使用 [not_analyzed] 显示设置字段不分词。

jar 包使用的 [elasticsearch-2.4.1.jar],代码中不知道如何设置。


  1. http://stackoverflow.com/questions/30384316/spring-data-elasticsearch-field-fieldindex-not-analyzed-ignored

  2. https://github.com/spring-projects/spring-data-elasticsearch/


貌似是 ES 环境配置问题,具体是哪个配置还不知道。


通过手动创建索引,设置该属性为不分析 (not_analyzed) 可以实现使用 term guid 查询出数据。

json
"companyGuid": {
  "type": "string"
  ,"index": "not_analyzed"
}

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.