Friday, March 30, 2007

Query Textml for Documents by Size and Collection

I wanted to search Textml for documents over a certain size and in a particular collection to help track down some problems we were having. Here's a query that does it:
<?xml version="1.0" encoding="UTF-16"?>
<query VERSION="3.6" RESULTSPACE="R1">
<andkey>
<property NAME="Collection">
<elem>/encyclopedias/<anystr></elem>
</property>
<property NAME="Size">
<interval>
<start INCLUSIVE="True">
<number>100000</number>
</start>
</interval>
</property>
</andkey>
</query>
Note that you can also set the upper limit for the interval by using the <end> element.

No comments: