Open CGenie opened 2 weeks ago
BTW, if my doc has field name Location
and the json transforms that to lowercase location
should I put field name in index capitalized or lowercase?
Hi @CGenie
apologies for the delay responding. Here's what's missing in your code:
indexMapping.DefaultMapping = newMapping
.
When using a geopoint field with bleve, the above line is required to avoid indexing the geo points as numeric values in the _all field. Here's a unit test for reference - https://github.com/blevesearch/bleve/blob/master/search_test.go#L1862. Not specifying the DefaultMapping for the index results in 0 results, similar to what you've observed in your test.
OK it works, thank you! This is so nice and at the same time extremely fast (I used DuckDB and needed quite some thinking to get the query as performant as bleve).
Hello,
I have this simple code: https://git.sr.ht/~cgenie/bleve-geo-test/tree/master/item/main.go
I basically copied it from issue https://github.com/blevesearch/bleve/issues/1789 and applied the fixes about
indexMapping.TypeField = "type"
. However, the results are still empty for me:What am I doing wrong?