AI OnAI Off
You can probably use a boolQuery for this:
{
"query" : {
"bool": {
"should": [
{"wildcard" : { "ProductName$$string.lowercase": "*" + request.term + "*" }},
{"wildcard" : { "ProductCategory$$string.lowercase": "*" + request.term + "*" }}
]
}
},
"fields": [
"ProductName$$string",
"ProductCategory$$string"
]
}
Apologies if this is obvious
Is it possible to do autocomplete with more than one field
This example shows it with one field as a source which I've got working
http://find.episerver.com/Documentation/searching-with-javascript-autocomplete
I can see that the post data fields is an array but what about the wildcard and the output for the success filed. This is what we are doing currently for one field
Thanks