I wasn’t able to get a result when I use a $search query like this:
phrase: {
path: 'tags',
query: 'Some Words'
}
}
Where tags is defined in the index with these settings:
tags: {
"type": "autocomplete",
"tokenization": "edgeGram",
"minGrams": 3,
"maxGrams": 7,
"foldDiacritics": false,
}
Modifying the index to…
tags: { type: "string" }
…fixed this for me. Are phrase
and autocomplete
incompatible? I didn’t see anything about this in the docs and spent the past half a day narrowing it down. Any plans to add support for this?
Ideally I’d like to use phrase
in a compound.must
for anything the user passes along in quotes and return exact matches for that. Is there a way to use autocomplete but NOT use phrase
, and instead perhaps use sequential: tokenOrder
and, say, maxEdits: 0
?
Then I’d have any other words NOT in quotes split into an array and used as the query
in a compound.should
expression.
Thank you so much for this amazing software!