hello,
<https://stackoverflow.com/questions/24323480/elasticsearch-queries-always-return-all-the-datas-stored-in-the-index#> I'm trying to index and query an index store in ES 1.2. I both create and populate the index with the JAVA API using the transportclient api. I have the following mapping: get /tp/carte/_mapping{ "tp": { "mappings": { "carte": { "properties": { "adherents": { "properties": { "birthday": { "type": "date", "format": "dateOptionalTime" }, "firstname": { "type": "string" }, "lastname": { "type": "string" } } }, "dateEdition": { "type": "date", "format": "dateOptionalTime" } } } } }} When I search ob object with the ID, it works fine but, when I try to query the content of one of my nested objects, *ES always returns all the objects stored in the index*. I also tried to create the objects manually with sense and I have the same behaviour. Example of my insert put /tp/carte/20454795{ "dateEdition": "2014-06-01T22:00:00.000Z", "adherents": [ { "birthday": "1958-05-05T23:00:00.000Z", "firstname": "ANDREW", "lastname": "DOE" }, { "birthday": "1964-03-01T23:00:00.000Z", "firstname": "ROBERT", "lastname": "DOE" }, { "birthday": "1989-02-27T23:00:00.000Z", "firstname": "DAVID", "lastname": "DOE" }, { "birthday": "1990-12-11T23:00:00.000Z", "firstname": "JOHN", "lastname": "DOE" } ] } Finally, you could find below a query executed in sense get /tp/carte/_search{ "query": { "bool": { "must": [ { "match": { "adherents.lastname": { "query": "DOE" } } } ] } } How can I fix that ? Thanks Regards Alexandre -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6102e860-e997-45db-9db4-7da309e6c761%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
