Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Zend Framework
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to version 1.0 of the Zend Framework
8
 * license, that is bundled with this package in the file LICENSE, and
9
 * is available through the world-wide-web at the following URL:
10
 * http://www.zend.com/license/framework/1_0.txt. If you did not receive
11
 * a copy of the Zend Framework license and are unable to obtain it
12
 * through the world-wide-web, please send a note to license@zend.com
13
 * so we can mail you a copy immediately.
14
 *
15
 * @package    Zend_Search_Lucene
16
 * @subpackage Search
17
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
18
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
19
 */
20
 
21
 
22
/**
23
 * Calculate query weights and build query scorers.
24
 *
25
 * A Weight is constructed by a query Query->createWeight().
26
 * The sumOfSquaredWeights() method is then called on the top-level
27
 * query to compute the query normalization factor Similarity->queryNorm(float).
28
 * This factor is then passed to normalize(float).  At this point the weighting
29
 * is complete.
30
 *
31
 * @package    Zend_Search_Lucene
32
 * @subpackage Search
33
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
34
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
35
 */
36
abstract class Zend_Search_Lucene_Search_Weight
37
{
38
    /**
39
     * The weight for this query.
40
     *
41
     * @return float
42
     */
43
    abstract public function getValue();
44
 
45
    /**
46
     * The sum of squared weights of contained query clauses.
47
     *
48
     * @return float
49
     */
50
    abstract public function sumOfSquaredWeights();
51
 
52
    /**
53
     * Assigns the query normalization factor to this.
54
     *
55
     * @param $norm
56
     */
57
    abstract public function normalize($norm);
58
}
59