I am using one customize analyzer which resolves issue realated to dot,hypen etc.
but i don't want to search it like EXAMPLE: fieldname:"word to be searched" in kibana so is there any other way to search a word without using above approach.I want to search it directly without using fields.
Hi Diksha, thanks for posting your question. I think I understand what you're asking but I have a few questions to help me clarify my understanding.
- Can you link me to some information on the dot and hyphen issue you mentioned?
- Are you saying you want to search for the presence of "word to be searched" anywhere in a document?
- If this is the case, how are you executing your search? Is this in the Dev Tools Console? Or in the search bar in Discover/Visualize/Dashboard?
In Dev Tools Console, you can execute a search query for a query string like this:
GET /_search
{
"query": {
"bool": {
"must": [
{ "query_string": { "query": "word to be searched" }}
]
}
}
}
You can specify fields to search against but by default this search against the special _all field, which concatenates all other field values together.
See the Query String query docs for more info on how to configure this query.
In Discover/Visualize/Dashboard, when you enter a string into the search bar, a Query String query is what gets executed by Kibana. Does this help?
Thanks,
CJ