I am new to elastic and planning to migrate my application from algolia to elastic cloud.
In algolia after creating an index and writing a document I can search by passing a search query, no need to specify wildcard patterns.
Question 1: How can achieve above behavior?
Question 2:
i.e
document data
{
"objectID": "005klrWVvNX0RwxxX78O",
"dn": "Root Vegetables Beetroot",
"mq": 30,
"desc" : "blah blah",
"price": "150"
}
I can search for keyword "Veg" for the field "dn" and it will match this record. I dont have to mention wildcard patterns by worrying if pre and post charecters exist by specifying "Veg" or "Root*".
How can I acheive this simple search effectively?
Also I found one strange behavior,
Below search payload is not working
{
"query": {
"wildcard": {
"objectID": {
"value": "005klrWVvN*"
}
}
}
}
Below search payload is working,
{
"query": {
"wildcard": {
"objectID": {
"value": "005klr*"
}
}
}
}
Whats wrong with my first request?
Thank you