hello all,
I am getting a very strange error when trying to search for a document
using GitHub - phillro/node-elasticsearch-client: A client written in node for elastic search
the full error message can be found here: org.elasticsearch.search.SearchParseException: [test][2]: from[-1],size[-1]: Par - Pastebin.com
My search code is as follows (am trying to test the client out)
var ElasticSearchClient = require('elasticsearchclient');
var serverOptions = {
host: 'localhost',
port: 9200
};
var elasticSearchClient = new ElasticSearchClient(serverOptions);
var qryObj = {
field1 : 'tags'
}
elasticSearchClient.search('test', 'tags', qryObj)
.on('data', function(data) {
console.log(JSON.parse(data))
})
.on('done', function(){
//always returns 0 right now
})
.on('error', function(error){
console.log(error)
})
.exec()
I have checked elasticsearch head and the document is there.
The only thing I can tell from the error is that there seems to be an error
parsing the document
The error that the javascript client shows is as follows (note, this is
shown as 'data' not 'error':
{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures {[i87dRn9lTJKavNGeDsLmzw][test][4]:
SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to
parse source [{"field1":"tags"}]]]; nested:
SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [No parser
for element [field1]]]; }{[i87dRn9lTJKavNGeDsLmzw][test][3]:
SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to
parse source [{"field1":"tags"}]]]; nested:
SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [No parser
for element [field1]]]; }{[i87dRn9lTJKavNGeDsLmzw][test][2]:
SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to
parse source [{"field1":"tags"}]]]; nested:
SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [No parser
for element [field1]]]; }{[i87dRn9lTJKavNGeDsLmzw][test][0]:
SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to
parse source [{"field1":"tags"}]]]; nested:
SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [No parser
for element [field1]]]; }{[i87dRn9lTJKavNGeDsLmzw][test][1]:
SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to
parse source [{"field1":"tags"}]]]; nested:
SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [No parser
for element [field1]]]; }]","status":400}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.