Answer the question
In order to leave comments, you need to log in
How can I efficiently search for URIs that match a pattern using Elastic?
It is necessary to look for records whose value data.request.uri
would match the pattern /plans/:id/order
, where :id
is a variable value (24-digit ID from MongoDB, for example).
Having tried different options (regulars, Query string), I did not find anything more effective than stupidly finding it through match
:
{
"query": {
"bool" : {
"must": [
{
"range" : {
"@timestamp" : {
"gte" : "2019-06-11T00:00:00",
"lt" : "now"
}
}
},
{
"match" : {
"data.request.method" : {
"query" : "PUT"
}
}
},
{
"match" : {
"data.request.uri" : {
"query" : "plans order"
}
}
}
]
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question