orientdb-lucene
orientdb-lucene copied to clipboard
Fixes #47 by adding support for QueryParser options
Here is the current query + options syntax:
SELECT filename FROM hash_table WHERE [block, hash] LUCENE {"q":"block:768 AND hash:wemfOGxqCfOTPi0ND~", "LowerCaseExpandedTerms": "false", "ParserType": "classic"}
Option terms are case insensitive.
Added support for all the options exposed by the setter methods of org.apache.lucene.queryparser.classic.QueryParserBase:
AllowLeadingWildcard, AnalyzeRangeTerms, AutoGeneratePhraseQueries, DateResolution, DateResolution, DefaultOperator, FuzzyMinSim, FuzzyPrefixLength, Locale, LowercaseExpandedTerms, MultiTermRewriteMethod, PhraseSlop, TimeZone
Also implemented the following additional option:
ParserType: Overrides the automatic parser type selection (which is based on the parentheses found in the query) in order to allow some specific use cases.
@maggiolo00 WDYT about this?
+1 I did start to support the json syntax to add options to the query. So it is really cool. I will check it more later. Thanks @retrography
Great! Looking forward to trying it soon -- probably next week.
@maggiolo00 and @robfrank WDYT about this PR?
@retrography Please could you sign the Clahub license (Apache2)?
@lvca Done!
@robfrank Is this merged in the codebase on the main project?