I found documentation here that still references CONTAINS, but also includes a deprecation notice.
The following doctype declaration works:
But if I remove "precision", tests start failing because
RequestError(400, 'search_phase_execution_exception', 'CONTAINS query relation not supported for Field [bounding_box]')
I'm actually on 6.6 currently, but there's a good chunk of functionality that depends on CONTAINS, or at least something that functions like CONTAINS. Are there workarounds for this?
It's not deprecated, more like a temporary regression of functionality. We added new BKD-backed geoshapes in 6.6 which come with a ton of benefits (faster indexing, better precision, better memory overhead), but they don't support
CONTAINS queries yet. We decided to release support for BKD geoshapes anyway, despite missing some functionality, so that people could start indexing into the new shapes and get the other benefits
There's a PR up to add support in Lucene, and an Elasticsearch issue tracking that progress. The Lucene PR is moving along nicely, so we hope to get it added back soon.
Today, that means there are two options: move to the new BKD geoshapes and just avoid
CONTAINS queries until it is added back, or stay with the old prefix-tree geoshapes and then upgrade to BKD when
CONTAINS support lands.
Hope that helps!
Gotcha. Thank you for the clarification! I'll keep an eye out for that release.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.