Rewrite distance operator `<->` into the specific distance function if existing index won't trigger
Ngalstyan4 opened this issue · 1 comments
Ngalstyan4 commented
Currently we properly detect and fail the query in cases when the distance operator <->
is used outside of index-search context
We only check for existence of the index, however, and we do not check whether the index will actually be triggered.
This means that on small tables search queries fill fail unless we set enable_seqscan=off
. This is bad UX.
We can instead detect that index is not used and rewrite the query to trigger the right distance operator.
gnehzza commented
I'm currently working on this issue, to avoid someone else overlapping with me.