【发布时间】:2020-10-08 05:37:25
【问题描述】:
我在 Elassandra 有桌子。我需要在该表的几列而不是整个表上创建弹性搜索索引。
{"discover":".*"} 选项正在为表的所有列创建索引。但我无法在几列上创建索引。
curl -XPUT -H 'Content-Type: application/json' 'http://localhost:9200/test_idx' -d '{
"settings": {"keyspace":"dm" },
"mappings": {
"mytable": {
"properties": {
"did": { "type": "text" },
"defectx": { "type": "float" },
"defecty": { "type": "float" },
"mdc": { "type": "text" }
}
}
}
}'
不知道是什么错误。请帮我纠正少数列的语法,但不是全部。
【问题讨论】:
-
你的弹性版本是什么?请提供弹性答案
-
我可以通过传递 cql_collection 在几列上创建索引。 "did": {"type": "text", "cql_collection":"singleton" }