just a heads-up for folks who've upgraded to 1.0.x from 0.9x (as did I). It 
appears - and I could be wrong - that field 
query<http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/query-dsl-field-query.html>syntax
 no longer works (while equivalent query_string query still does). 
Has field query been deprecated?

this works for me:

{
  "query": {
    "query_string": {
      "default_field": "name",
      "query"        : "foo"
    }
  }
}

this produces error:

{
  "query": {
    "field": {
      "name": "foo"
    }
  }
}

[STARTED]: Failed to execute 
[org.elasticsearch.action.search.SearchRequest@1dfcee26]
org.elasticsearch.search.SearchParseException: [admin_1395519377710][0]: 
from[-1],size[-1]: Parse Failure [Failed to parse source [{
  "query": {
    "field": {
      "name": "foo"
    }
  }
}]]
at 
org.elasticsearch.search.SearchService.parseSource(SearchService.java:595)
at 
org.elasticsearch.search.SearchService.createContext(SearchService.java:498)
at 
org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:472)
at 
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:316)
at 
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:304)
at 
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at 
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at 
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:203)
at 
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.elasticsearch.index.query.QueryParsingException: 
[admin_1395519377710] No query registered for [field]
at 
org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:221)


AFAIK the two are supposed to be identical queries.

-nikita

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/522d218d-312c-49b9-a1d1-912f4e5a7174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to