I have "user" object and it has nested object "status" which has few boolean flags. I am able to search with name and phone values. I need to search all the users which has that boolean flag. For example search all users which has flag1 status set. Preferable solution will be during indexing time. Just FYI I am using couchdb river to populate the data.
You might want to consider using regular objects rather than nesting in this case, I've found that nesting only helps if you are planning to update the nested objects separately and much more frequently than the main object.
Thanks for reply, in this case yes nested object will be updated more often. Just confirming during indexing in mapping I should set the filter on nested object and then if I search for flag1 I will get appropriate results. correct?
Your mapping document should say that status property is a nested property, during indexing you are just indexing the document as is. You would use the nested filter as part of your query for the user objects. If that doesn't work it might be easier if you post relevant parts of your mapping document along with a sample query.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.