Hi. This is my first time trying elastic search and I am looking for a way to include an analyzer in my code. I have a bug at work that prevents me from doing a search like this, where the search term is
1:45 am
. I want to use the whitespace analyzer but I have no idea how to go about it.
The node client has a code that looks like the snippet below and I am searching by title. Please note that necessary conditions and sufficient conditions work for all kinds of search except when it contains a special character.
const data = await client.search({
index: 'meetings',
type: 'notes',
body: {
'sort': [{date: {order: "desc"}}],
'query': {
'bool': {
'must': necessaryCondition,
'should': sufficientCondition,
'minimum_should_match': 1
}
},
'_source': ['title', 'validAttendees' ...etc]
},
from,
size,
});
I hope my phrasing of the question is good enough for anyone reading this to be able to help. Thanks in advance.