If I run the following query on travel-sample I expect to get total = 1 but it actually returns total = 187 (all the documents where type = ‘airline’);
SELECT count(*) as total FROM travel-sample where type=‘airline’ AND meta().id = ‘airline_10’
If I delete the secondary indexes that include the airline type:
DROP INDEX travel-sample.def_type
DROP INDEX travel-sample.def_icao
The query works as expected and I get total = 1. Why does the existence of the secondary indexes affect this count?