0

我在 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" }
                            }
        }
    }
}'

不知道是什么错误。请帮助我纠正少数列的语法,但不是全部。

4

1 回答 1

1

您的语法在现有表的几列上创建索引是正确的。检查索引是否已存在,并且您的键空间和表名是否正确。

于 2020-10-08T07:05:16.533 回答