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

Add a test for regex usage to runtime fields #63951

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Oct 20, 2020

Now that we've got regexes enabled by default (#63029) this adds a test
to runtime fields just to make sure that it works with regexes. It does,
but this adds a test to make sure it continues to work.

Now that we've got regexes enabled by default (elastic#63029) this adds a test
to runtime fields just to make sure that it works with regexes. It does,
but this adds a test to make sure it continues to work.
@nik9000 nik9000 added >test Issues or PRs that are addressing/adding tests :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.11.0 labels Oct 20, 2020
@nik9000 nik9000 requested a review from javanna October 20, 2020 17:08
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Oct 20, 2020
Matcher m = /([^ ]+) .+/.matcher(doc["message"].value);
if (m.matches()) {
emit(m.group(1));
}
Copy link
Member

Choose a reason for hiding this comment

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

out of curiosity, what happens when matches returns false for a doc? the runtime field wont have any value thats it?

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

thanks @nik9000

@nik9000
Copy link
Member Author

nik9000 commented Oct 20, 2020 via email

@nik9000 nik9000 merged commit fc96ee9 into elastic:master Oct 20, 2020
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Oct 20, 2020
Now that we've got regexes enabled by default (elastic#63029) this adds a test
to runtime fields just to make sure that it works with regexes. It does,
but this adds a test to make sure it continues to work.
nik9000 added a commit that referenced this pull request Oct 20, 2020
Now that we've got regexes enabled by default (#63029) this adds a test
to runtime fields just to make sure that it works with regexes. It does,
but this adds a test to make sure it continues to work.
pugnascotia pushed a commit to pugnascotia/elasticsearch that referenced this pull request Oct 21, 2020
Now that we've got regexes enabled by default (elastic#63029) this adds a test
to runtime fields just to make sure that it works with regexes. It does,
but this adds a test to make sure it continues to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >test Issues or PRs that are addressing/adding tests v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants