Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

and (Structured Query)

isubiker edited this page Nov 11, 2011 · 1 revision

Combines any number of query constructors together so that each of them are satisfied in order for a document to be returned in the results.

The following query will return documents where the author value equals "Noam Chomsky" and the title value contains "Manufacturing Consent":

{"and": [
    {
        "key": "author"
        "equals": "Noam Chomsky"
    },
    {
        "key": "title"
        "contains": "Manufacturing Consent"
    }
]}

<and>
    <constraint>
        <key>author</key>
        <equals>Noam Chomsky</equals>
    </constraint>
    <constraint>
        <key>title</key>
        <contains>Manufacturing Consent</contains>
    </constraint>
</and>
Clone this wiki locally