Range queries are intended for searching terms within specified interval.
Query string:
mod_date:[20020101 TO 20030101]
title:{Aida TO Carmen}
or
Query construction by API:
<?php
$from = new Zend_Search_Lucene_Index_Term('20020101', 'mod_date');
$to = new Zend_Search_Lucene_Index_Term('20030101', 'mod_date');
$query = new Zend_Search_Lucene_Search_Query_Range(
$from, $to, true // inclusive
);
$hits = $index->find($query);
Term fields are optional. Zend_Search_Lucene searches through all
fields if the field is not specified:
<?php
$from = new Zend_Search_Lucene_Index_Term('Aida');
$to = new Zend_Search_Lucene_Index_Term('Carmen');
$query = new Zend_Search_Lucene_Search_Query_Range(
$from, $to, false // non-inclusive
);
$hits = $index->find($query);
Either (but not both) of the boundary terms may be set to NULL.
Zend_Search_Lucene searches from the beginning or
up to the end of the dictionary for the specified field(s) in this case:
<?php
// searches for ['20020101' TO ...]
$from = new Zend_Search_Lucene_Index_Term('20020101', 'mod_date');
$query = new Zend_Search_Lucene_Search_Query_Range(
$from, null, true // inclusive
);
$hits = $index->find($query);




