the sort command failed with error:
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":
4,"failed":1,"failures":[{"index":"twitter","shard":
3,"reason":"QueryPhaseExecutionException[[twitter][3]:
query[ConstantScore(:)],from[0],size[10],sort[<custom:"user":
org.elasticsearch.index.field.data.strings.StringFieldDataType
$1@8d9b22>!]: Query Failed [Failed to execute main query]]; nested:
IOException[Can't sort on string types with more than one value per
doc, or more than one token per field]; "}]},"hits":{"total":
0,"max_score":null,"hits":[]}}
Is there a way to force ElasticSearch to sort over field "user" ?
the sort command failed with error:
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":
4,"failed":1,"failures":[{"index":"twitter","shard":
3,"reason":"QueryPhaseExecutionException[[twitter][3]:
query[ConstantScore(:)],from[0],size[10],sort[<custom:"user":
org.elasticsearch.index.field.data.strings.StringFieldDataType
$1@8d9b22>!]: Query Failed [Failed to execute main query]]; nested:
IOException[Can't sort on string types with more than one value per
doc, or more than one token per field]; "}]},"hits":{"total":
0,"max_score":null,"hits":}}
Is there a way to force Elasticsearch to sort over field "user" ?
Yes, this means you can only match on exact matches on that specific field.
For example, term/text query against Florian will not work, as well as
username:Florian
i'm quering for the word "surae" where i have in DB "sure", using the
above command, and i get 0 total results.
Is it possible to make elasticSearch to return the item with "sure"
message?
From mapping i guess all my terms are analized: "tweet" : {
"properties" : {
"message" : {
"type" : "string"
},
"user" : {
"type" : "string"
},
"post_date" : {
"type" : "string"
}
}
You can use different analysis process for the field, for example, use
ngrams to index the field, or different stemmers. Another option is to use
fuzzy queries, but its slower...
i'm quering for the word "surae" where i have in DB "sure", using the
above command, and i get 0 total results.
Is it possible to make elasticSearch to return the item with "sure"
message?
From mapping i guess all my terms are analized: "tweet" : {
"properties" : {
"message" : {
"type" : "string"
},
"user" : {
"type" : "string"
},
"post_date" : {
"type" : "string"
}
}
I tried with multi_field but still getting the error: "Can't sort on string types with more than one value per doc, or more than one token per field". Any thoughts?
{"took":5,"timed_out":false,"_shards":{"total":5,"successful":4,"failed":1,"failures":[{"index":"twitter","shard":3,"status":500,"reason":"RemoteTransportException[[Marvel Man][inet[/192.168.101.54:9301]][search/phase/query]]; nested: QueryPhaseExecutionException[[twitter][3]: query[ConstantScore(NotDeleted(cache(_type:tweet)))],from[0],size[10],sort[<custom:"user": org.elasticsearch.index.field.data.strings.StringFieldDataType$1@1248513>!]: Query Failed [Failed to execute main query]]; nested: IOException[Can't sort on string types with more than one value per doc, or more than one token per field]; "}]},"hits":{"total":0,"max_score":null,"hits":[]}}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.