Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SimpleQueryParser settings into separate Settings class, add "lenient" option #5208

Closed
wants to merge 2 commits into from

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 20, 2014

Fixes #5011

}

@Override
public Query newDefaultQuery(String text) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we factor the lentient handling part out in a single mehtod?

private Query rethrowUlessLentient(RuntimeException e) {
  if (settings.lenient()) {
   return null;
  }
  throw e;
}

man I with we had support for annonymous functions here or macros even :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, yes, lambdas would be great, maybe in 5-7 years when we're finally on Java 8 minimum :)

@javanna javanna assigned dakrone and unassigned uboness Feb 24, 2014
@s1monw
Copy link
Contributor

s1monw commented Feb 26, 2014

LGTM

@dakrone
Copy link
Member Author

dakrone commented Feb 26, 2014

Merged in 5429019

@clintongormley
Copy link

@dakrone Docs missing for this change

@dakrone
Copy link
Member Author

dakrone commented Aug 18, 2014

@clintongormley pushed 99b0fae and a46cf50 to document this.

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v1.1.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simple Query String: Add lenient flag to support *value* parse failures
4 participants