Skip to content

Instantly share code, notes, and snippets.

@p3consulting
p3consulting / Regression4FilterWithExistsAndMapping
Created February 12, 2011 15:26
Test to demonstrate that filter with "exists" doesn't work correctly once an implicit mapping is created.
Depending on if the implicit mapping has been created or not, the result with the "exists" filter condition will be wrong or correct (the total should be 3)"
On one machine, I got empty mapping after _bulk import and the result was correct for the filter "exists" : "geoloc".
On another one (the here bellow results), the implicit mapping was created by _bulk import and the result was incorrect.
In each case if the filtering is done on ""geoloc.lat" instead of "geoloc", the results are correct.
----------- CUT FROM HERE ----------
#!/bin/sh
curl -s -XPOST 'http://192.168.1.2:9200/_bulk' -d '