Skip to content

Regex search query#2008

Merged
himanshug merged 1 commit intoapache:masterfrom
codingwhatever:regex-search-query
Dec 3, 2015
Merged

Regex search query#2008
himanshug merged 1 commit intoapache:masterfrom
codingwhatever:regex-search-query

Conversation

@codingwhatever
Copy link
Copy Markdown

This PR adds a SearchQuerySpec that supports searching for a regex. It uses the same regex pattern match as the RegexFilter.

I will be adding documentation shortly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can u change to

(RegexSearchQuerySpec) jsonMapper.readValue(json, SearchQuerySpec.class);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wouldn't this fail if pattern was null?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can throw an exception in case the pattern in null and document pattern as a required value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

preconditions notnull with a hint to pattern is the typical workflow for things such as this. It helps debug on querying side.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ok, I added the precondition and removed all the null checks.

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Dec 2, 2015

👍 @himanshug any more comments?

@himanshug
Copy link
Copy Markdown
Contributor

👍

@himanshug himanshug closed this Dec 3, 2015
@himanshug himanshug reopened this Dec 3, 2015
@himanshug
Copy link
Copy Markdown
Contributor

@codingwhatever pls squash your commits to make it mergeable .

@codingwhatever
Copy link
Copy Markdown
Author

@himanshug I have squashed the commits.

himanshug added a commit that referenced this pull request Dec 3, 2015
@himanshug himanshug merged commit 0eab841 into apache:master Dec 3, 2015
@fjy fjy modified the milestone: 0.9.0 Feb 4, 2016
@fjy fjy mentioned this pull request Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants