Hello everyone,
Here's my sample data going into elastic Search.
{
"date_time_utc": "2014-01-01 01:01:01.000",
"details": "Details of the event",
"tracking_id": "Message Tracking Id",
"enterprise_application": "ENTP APP",
"log_level": "DEBUG",
"application_id": "342-34-254",
"source": "Source",
"log_code": "MDG.00.05",
"host": "127.0.0.1",
"context":
{
"A": "123",
"B": "456",
"C": "789"
}
}
When I am preparing for a search request, I am finding some issue.
Basically, I need a capability to search a user input across all the
elements of nested object "context".
Context might have nested fields under it on the fly. So I need some kind
of wild card operation of the fields itself like (context.*).
I found one way, but that searches on specific field within context like
given below.
"nested": {
"path": "context",
"filter": {
"bool": {
"must": [
{ "term": { "context.A: "0432" } }
]
}
}
}
Is there a way to search a user input across all the fields under context
nested element? I do not wish to search through rest of the fields.
I would prefer filter over query here.
Please advise.
Appreciate your inputs!
Regards,
Sagar Shah
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/5e04b543-9275-4bda-8696-068dd723b1d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.