Elasticsearch not_analyzed 中的数字是:整数、长整数、浮点数等吗?
Are numbers: integer, long, float etc... in Elasticsearch not_analyzed?
使用 Elasticsearch 1.4.3
我查看了文档,但我不确定到底是什么。但我认为整数、长整数、浮点数、双精度等...被 Lucene 索引为 not_analyzed 对吗?
谢谢
从这个link你有这个声明:
The other simple types (such as long
, double
, date
etc) also accept the index parameter, but the only relevant values are no
and not_analyzed
, as their values are never analyzed.
默认情况下不分析简单的非字符串类型(例如 long、double、date 等)。
这就是为什么您可以在以下映射定义中省略 "index": "not_analyzed"
的原因:
...
"mappings": {
"properties": {
"price": {
"type": "long",
"index": "not_analyzed"
}
}
}
...
但您可能决定根本不对该字段编制索引:
...
"mappings": {
"properties": {
"price": {
"type": "long",
"index": "no"
}
}
}
...
因此,将无法搜索该字段。
查找资源here
使用 Elasticsearch 1.4.3
我查看了文档,但我不确定到底是什么。但我认为整数、长整数、浮点数、双精度等...被 Lucene 索引为 not_analyzed 对吗?
谢谢
从这个link你有这个声明:
The other simple types (such as
long
,double
,date
etc) also accept the index parameter, but the only relevant values areno
andnot_analyzed
, as their values are never analyzed.
默认情况下不分析简单的非字符串类型(例如 long、double、date 等)。
这就是为什么您可以在以下映射定义中省略 "index": "not_analyzed"
的原因:
...
"mappings": {
"properties": {
"price": {
"type": "long",
"index": "not_analyzed"
}
}
}
...
但您可能决定根本不对该字段编制索引:
...
"mappings": {
"properties": {
"price": {
"type": "long",
"index": "no"
}
}
}
...
因此,将无法搜索该字段。
查找资源here