Open govindpatel opened 7 years ago
Luwak just provides the default LuceneQueryParser implementation for convenience, but for more complicated queries you're going to need to write your own parser. In particular, the default lucene query parser doesn't handle Point queries or Span queries. And/Or/Not you can do with simple boolean google-like operators of +
and -
@romseygeek
you said,
And/Or/Not you can do with simple boolean google-like operators of +
and -
but for more complicated queries you're going to need to write your own parser
Can you elaborate a little on those. Thanks.
Those docs are pretty out-of-date, you want to be looking at https://lucene.apache.org/core/6_5_0/queryparser/index.html instead, I think.
In particular, for Point fields, I think what you want to do is extend QueryParserBase and override getRangeQuery(). The reason that the default query parser doesn't handle point fields is that lucene is schemaless, so the parser doesn't know whether to generate term range queries, long range queries, point range queries, etc.
You might be better asking this sort of question directly on the lucene mailing list.
Hi I tried overriding getRangeQuery() but still having the same issue.
I tried debugging and i am seeing response as [query1,query3] instead of [query1]
The IndexSearcher query is "title:test1 anytokenfield:ANYTOKEN__" used inside the monitor query. i.e., QueryIndex.java line 110. instead of "title:test1 upvote:[12 TO 2147483647]"
I got [query1, query3] as response the complete code is at https://gist.github.com/mithranalandur/ce170ce287eca2a8f2cfaab6342068df
Can you give me some pointer like where am i going wrong.
Hi, I wanted to do numeric comparison like
greater than
less than
etc. So I wrote this,the above program gives the following result:
the query should not have matched the "query1" and "query2" because I wanted to match only if the document have upvote >= 10.
I have a bunch of things I wanted to try with luwak:
and
,or
andnot
?I did tried my best didn't find anything.. So creating a issue, Please help. Thanks,