How to filter a field values by 'contains' term

I want to filter out the results by getting all results which their 'testClass' field contains the 'policymanager.ui.common.RulesPageTests' package name.

Is there any way querying the results out?

Hey @nimrod, welcome to the discussion boards!

Can you try the following in the query bar:

NOT testClass: policymanager.ui.common.RulesPageTests*

Hi Larry, thanks!
But it still won't filter out the 'policymanager.ui.common.RulesPageTests' package name.. (I'm getting much more irrelevant results) is it possible this kind of query is not supported?

hmmm...

After running the query, can you click on the "Inspect" link on the top left of Discover, and then copy the contents of the "Request" tab of the flyout that appears here?

Hi Larry - I including the request content:

{
"version": true,
"size": 500,
"sort": [
{
"startTime": {
"order": "desc",
"unmapped_type": "boolean"
}
}
],
"_source": {
"excludes":
},
"aggs": {
"2": {
"date_histogram": {
"field": "startTime",
"interval": "5m",
"time_zone": "Asia/Jerusalem",
"min_doc_count": 1
}
}
},
"stored_fields": [
""
],
"script_fields": {},
"docvalue_fields": [
{
"field": "startTime",
"format": "date_time"
}
],
"query": {
"bool": {
"must": [
{
"range": {
"startTime": {
"format": "strict_date_optional_time",
"gte": "2019-11-26T10:16:43.146Z",
"lte": "2019-11-26T13:16:43.146Z"
}
}
}
],
"filter": [
{
"bool": {
"must_not": {
"bool": {
"should": [
{
"query_string": {
"fields": [
"testClass"
],
"query": "policymanager\.ui\.common\.RulesPageTests
"
}
}
],
"minimum_should_match": 1
}
}
}
}
],
"should": ,
"must_not":
}
},
"highlight": {
"pre_tags": [
"@kibana-highlighted-field@"
],
"post_tags": [
"@/kibana-highlighted-field@"
],
"fields": {
"*": {}
},
"fragment_size": 2147483647
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.