PageRenderTime 122ms CodeModel.GetById 80ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/library/Zend/Search/Lucene/Search/Weight/Empty.php

https://bitbucket.org/nosen/jelly2
PHP | 57 lines | 12 code | 7 blank | 38 comment | 0 complexity | d8429bb7ac3c7e7c49a0c97ff031a0d0 MD5 | raw file
 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 Search
18 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
20 * @version    $Id: Empty.php 23775 2011-03-01 17:25:24Z ralph $
21 */
22
23
24/** Zend_Search_Lucene_Search_Weight */
25require_once 'Zend/Search/Lucene/Search/Weight.php';
26
27
28/**
29 * @category   Zend
30 * @package    Zend_Search_Lucene
31 * @subpackage Search
32 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license    http://framework.zend.com/license/new-bsd     New BSD License
34 */
35class Zend_Search_Lucene_Search_Weight_Empty extends Zend_Search_Lucene_Search_Weight
36{
37    /**
38     * The sum of squared weights of contained query clauses.
39     *
40     * @return float
41     */
42    public function sumOfSquaredWeights()
43    {
44        return 1;
45    }
46
47
48    /**
49     * Assigns the query normalization factor to this.
50     *
51     * @param float $queryNorm
52     */
53    public function normalize($queryNorm)
54    {
55    }
56}
57