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

near (Structured Query)

isubiker edited this page Nov 11, 2011 · 1 revision

Returns true if the queries are found within the specified distance of each other.

{
    "near": [
        {
            "key": "foo",
            "equals": "bar"
        }, 
        {
            "key": "foo",
            "equals": "baz"
        }  
    ],  
    "ordered": true, /* Optional */
    "distance": 15,  /* Optional, defaults to 10 */
    "weight": 2      /* Optional, defaults to 1 */
}

<constraint>
    <near>
        <constraint>
            <key>foo</key>
            <equals>bar</equals>
        </constraint>
        <constraint>
            <key>foo</key>
            <equals>baz</equals>
        </constraint>
    </near>
    <ordered>true</ordered>
    <distance>15</distance>
    <weight>2</weight>
</constraint>
Clone this wiki locally