Can not create an index mapping

297 views
Skip to first unread message

Daniel Seidler

unread,
Nov 8, 2017, 10:08:43 AM11/8/17
to Elassandra User Mailing List
I have tried a simple twitter example with:

cqlsh> CREATE KEYSPACE twitter WITH replication = { 'class': 'NetworkTopologyStrategy', 'DC1': 3 };
cqlsh> CREATE TABLE twitter.tweet (
   ...     "_id" text PRIMARY KEY,
   ...     message text,
   ...     post_date timestamp,
   ...     size bigint,
   ...     user text
   ... );


$ curl -XPUT "http://localhost:9200/twitter/" -d '{
   "mappings" : {
      "tweet" : {
            "properties" : {
              "message" : { 
                "type" : "string", 
                "index" : "not_analyzed", 
                "cql_collection": "singleton" 
              },
              "post_date" : { 
                "type" : "date", 
                "format": "yyyy-MM-dd", 
                "cql_collection": "singleton" 
              },
              "user" : { 
                "type" : "string",
                "index" : "not_analyzed", 
                "cql_collection": "singleton" 
              },
              "size" : { 
                "type" : "long",
                "cql_collection": "singleton" 
              }
            }
      }
   }
}'


{
    "acknowledged": false,
    "shards_acknowledged": false
}



The index has not been created. In system.log I'm seeing following warnings:

2017-11-08 16:01:53,514 INFO  [MigrationStage:1] ColumnFamilyStore.java:408 <init> Initializing twitter.tweet
2017-11-08 16:02:05,971 INFO  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] StorageService.java:3817 setLoggingLevel set log level to TRACE for classes under 'index.search.slowlog.query.twitter' (if the level doesn't look like 'TRACE' then the logger couldn't parse 'TRACE')
2017-11-08 16:02:05,972 INFO  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] StorageService.java:3817 setLoggingLevel set log level to TRACE for classes under 'index.search.slowlog.fetch.twitter' (if the level doesn't look like 'TRACE' then the logger couldn't parse 'TRACE')
2017-11-08 16:02:05,976 WARN  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] DeprecationLogger.java:290 deprecated Expected a boolean [true/false] for property [index] but got [not_analyzed]
2017-11-08 16:02:05,977 WARN  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] DeprecationLogger.java:290 deprecated Expected a boolean [true/false] for property [index] but got [not_analyzed]
2017-11-08 16:02:06,009 WARN  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] ClusterService.java:2903 persistMetaData PAXOS Failed to update metadata oldMetadata=9945f55a-c285-4723-a1ac-4d4e768d717d/0 currentMetaData=ff3e8c42-5529-4438-9c0b-a5e908ac8bbb/1 in cluster test
2017-11-08 16:02:06,009 WARN  [elasticsearch[10.1.2.145][clusterService#updateTask][T#1]] ClusterService.java:1436 publishAndApplyChanges Cannot overwrite persistent metadata, will resubmit task whe





Martin Mucha

unread,
Nov 23, 2017, 6:59:13 AM11/23/17
to Elassandra User Mailing List
I'm super-beginner so I'm most probably wrong, but I feel I saw this more or less ... it seems that ID is missing in URL, so elastic search must generate one, and in that case you should use POST method. Can you try that?

vroyer

unread,
Nov 29, 2017, 3:31:57 PM11/29/17
to Martin Mucha, Elassandra User Mailing List
Your nodes are desynchronized, please restart node 9945f55a-c285-4723-a1ac-4d4e768d717d and check that you have enough resources to runs 3 nodes.
Thanks.

--
You received this message because you are subscribed to the Google Groups "Elassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elassandra+...@googlegroups.com.
Visit this group at https://groups.google.com/group/elassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/elassandra/140a5cca-a80f-457b-a52f-60ddeb9baa36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages