I have the following documents stored in my Couchbase DB:
{
name:'first document',
document_props:['final','received','sent']
}
{
name:'second document',
document_props:['final','sent']
}
Now I want to list all documents in which documents_props
has final
and received
. Suppose I need this for final
, received
, sent
. What can I do to facilitate this supposing those properties are not fixed (are free text)?
My current though is to fetch all and evaluate within the application, but this will be really hard work since the database is growing really fast.