这些查询不起作用:
INFO: Searching with query: year:(<=2008 OR 2011)
INFO: Searching with query: year:(<=2008)
代码
log.info("Searching with query: " + q);
try {
Results<ScoredDocument> results = getIndex().search(q);
例外
INFO: Searching with query: year:(<=2008 OR 2011)
line 1:7 no viable alternative at input '<='
Nov 08, 2013 3:36:03 PM org.apache.struts2.dispatcher.Dispatcher error
SEVERE: Exception occurred during processing request: Unable to parse query: year:(<=2008 OR 2011)
com.google.appengine.api.search.SearchQueryException: Unable to parse query: year:(<=2008 OR 2011)
at com.google.appengine.api.search.checkers.QueryChecker.checkQueryParses(QueryChecker.java:44)
at com.google.appengine.api.search.checkers.QueryChecker.checkQuery(QueryChecker.java:28)
at com.google.appengine.api.search.Query$Builder.setQueryString(Query.java:91)
at com.google.appengine.api.search.Query$Builder.build(Query.java:107)
at com.google.appengine.api.search.IndexImpl.searchAsync(IndexImpl.java:378)
at com.google.appengine.api.search.IndexImpl.search(IndexImpl.java:479)
版本
appengine-api-1.0-sdk-1.8.6.jar
参考
https://developers.google.com/appengine/docs/java/search/query_strings