I'm trying to limit my data to only docs that have the word 'foo' appear at
least once.
I am trying to use:
fq=termfreqdata,'foo'):[1+TO+*]
but I get the syntax error:
Caused by: org.apache.lucene.queryparser.classic.ParseException: Encountered
" ":" ": "" at line 1, column 33.
Was expecting one of:
<EOF>
<AND> ...
<OR> ...
<NOT> ...
"+" ...
"-" ...
<BAREOPER> ...
"(" ...
"*" ...
"^" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
"{" ...
<NUMBER> ...
at
org.apache.lucene.queryparser.classic.QueryParser.generateParseException(QueryParser.java:708)
at
org.apache.lucene.queryparser.classic.QueryParser.jj_consume_token(QueryParser.java:590)
at
org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:171)
at
org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:119)
... 25 more
What is the proper way to do this?