andkey (index conjunction operator)

The andkey operator locates documents containing all the specified values (words, strings, dates, times or numbers) from two or more indexes.

The andkey operator is specified with the <andkey> element. Indexes in which the search is performed and search values are defined as children of <andkey>.

This sample query retrieves news stories that:

  • Contain Canada in the headline, AND
  • Were published in July 2000.
<?xml version="1.0" encoding="UTF-16"?>
<!-- andkeyQuery.xml -->
<query VERSION="4.5" RESULTSPACE="andkeyQuery"> 
    <andkey> 
        <key NAME="Headline"> 
            <elem>Canada</elem> 
        </key> 
        <key NAME="Date"> 
            <date>
                <year>2000</year>
                <month>07></month>
            </date>
        </key> 
     </andkey> 
</query>