Getting error for index creation

14 views
Skip to first unread message

Roger Noronha

unread,
Nov 13, 2020, 4:48:33 PM11/13/20
to Elassandra User Mailing List
Hi,

I am unable to create index through elassandra. I cannot figure out what are the required steps.

1.)
curl -XPUT "http://localhost:9200/testdata?pretty" -H "Content-Type: application/json" -d "{ \"settings\": { \"keyspace\": \"testnetwork\"}, \"mappings\": { \"testdata\" : { \"discover\" : \".*\" } } }"
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unknown setting [index.keyspace] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "unknown setting [index.keyspace] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status" : 400
}

2.)



Thanks,
Roger

tetsushi awano

unread,
Nov 15, 2020, 9:35:23 AM11/15/20
to Elassandra User Mailing List
if you want to create es index/mapping of keyspace A, table B. you will need to execute below.

1. create index

curl -X PUT http://localhost:9200/A

2. check the created index

curl -X GET http://localhost:9200/_cat/indices?v&index=A

3. add the mapping

curl -X PUT http://localhost:9200/A/_mapping/B -H 'Content-Type: application/json' -d '{"B" : {"discover" : ".*"}}'

4.check the mapping

curl -X GET http://localhost:9200/A/B/_mapping

5. make a test query to index/mapping

curl -X GET http://localhost:9200/A/B/_search -H 'Content-Type: application/json' -d '{"from": 1,"size": 10,"query": {"match_all": {}}}'


Reply all
Reply to author
Forward
0 new messages