equal
deleted
inserted
replaced
|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Search_Lucene |
|
17 * @subpackage Index |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: TermsPriorityQueue.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
21 */ |
|
22 |
|
23 /** Zend_Search_Lucene_PriorityQueue */ |
|
24 require_once 'Zend/Search/Lucene/PriorityQueue.php'; |
|
25 |
|
26 /** |
|
27 * @category Zend |
|
28 * @package Zend_Search_Lucene |
|
29 * @subpackage Index |
|
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
32 */ |
|
33 class Zend_Search_Lucene_Index_TermsPriorityQueue extends Zend_Search_Lucene_PriorityQueue |
|
34 { |
|
35 /** |
|
36 * Compare elements |
|
37 * |
|
38 * Returns true, if $termsStream1 is "less" than $termsStream2; else otherwise |
|
39 * |
|
40 * @param mixed $termsStream1 |
|
41 * @param mixed $termsStream2 |
|
42 * @return boolean |
|
43 */ |
|
44 protected function _less($termsStream1, $termsStream2) |
|
45 { |
|
46 return strcmp($termsStream1->currentTerm()->key(), $termsStream2->currentTerm()->key()) < 0; |
|
47 } |
|
48 |
|
49 } |