Skip to content

Add a test for regex usage to runtime fields#63951

Merged
nik9000 merged 1 commit intoelastic:masterfrom
nik9000:runtime_fields_regex_test
Oct 20, 2020
Merged

Add a test for regex usage to runtime fields#63951
nik9000 merged 1 commit intoelastic:masterfrom
nik9000:runtime_fields_regex_test

Conversation

@nik9000
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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
Copy Markdown
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