I am trying to execute a term query with value being a string which has colon in it. It works fine with the sense plugin.
GET XX/XX/_search
{
"query": {
"term" : { "XX.XX" : "7:140453136:T" }
}
}
But the same term query doesnt work with java API.
SearchRequestBuilder response = client.prepareSearch(indexName);
response.setTypes(indexType);
response.setSearchType(SearchType.DFS_QUERY_THEN_FETCH);
response.setQuery(QueryBuilders.termQuery("XX.XX", "7:140453136:T"));
response.setFrom(0).setSize(60).setExplain(true);
SearchResponse matchallResponse = response.execute().actionGet()
error:
TransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.search.SearchResponse]]
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.codecs.lucene50.Lucene50DocValuesFormat
- in my mapping i had set this field to be not analyzed. so i am sure elasticsearch is not tokenizing it. 2.I am using ES 2.1.1
I see that there is already a question on this. But the solution posted there dosent solve my problem.
lucene-codecslibrary is in your classpath? Your syntax looks absolutely fine, the error tells you that the class can't be found though - IanGabes