Elasticsearch:es-hadoop

Hello,

I'm working on the percolator queries. When I run the following command, it gives me an error:

curl -XPUT 'http://localhost:9200/es-storm/.percolator/1' -d '{
     "query": {
                  "match": {
                     "tweet": "bigdata analytics hadoop spark elasticsearch nosql graphdb cassandra mongo mongodb datascience pig hive solar cloudera hortonworks iot"
                  }
               }
}';

Error:

{"error":"PercolatorException[[es-storm] failed to parse query [1]]; nested: QueryParsingException[[es-storm] Strict field resolution and no field mapping can be found for the field with name [tweet]]; ","status":500}

Can someone help me with this please.

You did not define a mapping for tweet field ?

I've defined the mappings field and now it gives me the following error:

curl -XPUT 'http://localhost:9200/es-storm/.percolator/1' -d '
 {
 "mappings": {
 "query": {
                   "match": {
                      "tweet": "bigdata analytics hadoop spark elasticsearch nosql graphdb cassandra mongo mongodb datascience pig hive solar cloudera hortonworks iot"
                   }
                }
 }
 }';

Error:

{"error":"PercolatorException[[es-storm] failed to parse query [1]]; nested: NullPointerException; ","status":500}

Restart from scratch.
Provide a full example.

.percolator is not used anymore in 5.x BTW. Which version have you?

I am trying to create percolator queries in the Elasticsearch index. So first I create the index using the below queries:

curl -XPUT 'http://localhost:9200/es-storm/.percolator/1' -d '{
     "query": {
                  "match": {
                     "tweet": "bigdata analytics hadoop spark elasticsearch nosql graphdb cassandra mongo mongodb datascience pig hive solar cloudera hortonworks iot"
                  }
               }
}';
curl -XPOST 'http://localhost:9200/es-storm/.percolator/1
{
    "query" : {
        "match" : {
            "tweet" : "bigdata analytics hadoop spark elasticsearch eshadoop nosql mongo mongodb cassandra hbase titan orientdb neo4j storm pig hive cloudera hortonworks"
        }
    }
}'

Now I want to execute the percolate query:

curl -XGET 'http://localhost:9200/es-storm/storm-tweets/_percolate'  –d '{
    "doc" : {
        "tweet" : "I can't believe that I can now analyse trends from the hadoop data in a snap using Elasticsearch-Hadoop."
    }
}'

Which doesn't happen, as it gives me the errors that I mentioned in the previous posts.
Can you please tell me which version you want to know?

I am able to run the first and second queries, but when I try to run the third (percolate) query it doesn't run. It still waits for something to be done:

[eshadoop@localhost ~]$ curl -XGET http://localhost:9200/es-storm/storm-tweets/_percolate -d '
{
 "doc" : {
    "tweet" : "I can't believe that I can now analyze trends from hadoop data in a snap using Elasticsearch-Hadoop."
}
}';
> 
> 
> 

I don't know where I went wrong. Can you please look into it. Help would be greatly appreciated. Thanks in advance.

I meant elasticsearch version. What is it?

version - 1.7.1

So many changed from that version. It has been completely rewritten since then.
1.x is not supported anymore. So start a 5.4.2 version and play with this version instead.

ohh okay... I will try it. Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.