Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Fixes #47 by adding support for QueryParser options #53

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

retrography
Copy link

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.

@retrography retrography changed the title Fixes #47 and Adds support for QueryParser options Fixes #47 by adding support for QueryParser options May 31, 2015
@lvca
Copy link
Member

lvca commented Aug 7, 2015

@maggiolo00 WDYT about this?

@wolf4ood
Copy link
Member

wolf4ood commented Aug 7, 2015

+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

@retrography
Copy link
Author

Great! Looking forward to trying it soon -- probably next week.

@lvca
Copy link
Member

lvca commented Nov 13, 2015

@maggiolo00 and @robfrank WDYT about this PR?

@lvca
Copy link
Member

lvca commented Nov 13, 2015

@retrography Please could you sign the Clahub license (Apache2)?

@retrography
Copy link
Author

@lvca Done!

@lvca
Copy link
Member

lvca commented Jun 1, 2016

@robfrank Is this merged in the codebase on the main project?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants