1

I have user object and it has nested object status which has few boolean flags. I need to search all the users which has that boolean flag. For example search all users which has flag1 status set. I am able to search with name and phone values

Data structure:

user : {
  name: ABC,
  phone: 1234567890,
  status: {
    flag1: true,
    flag9: true
  }
}
Sach
  • 11
  • 1
  • for future posts, post what attempts you have made to do this. You can do this with linq `var filteredusers = UserTable.Where(x => x.flag1).ToList()` – johnny 5 Aug 20 '15 at 17:00
  • also tag you language – johnny 5 Aug 20 '15 at 17:00
  • Thanks Johnny, I am more specifically looking for solution using elasticsearch may be during index time. – Sach Aug 20 '15 at 17:11
  • I think [this](http://stackoverflow.com/questions/21343549/can-i-specify-the-result-fields-in-elasticsearch-query) question should help so in your case `"term" : { "flag" : true }` – johnny 5 Aug 20 '15 at 18:06

0 Answers0