TermInfo.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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-2008 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * A Zend_Search_Lucene_Index_TermInfo represents a record of information stored for a term.
  23. *
  24. * @category Zend
  25. * @package Zend_Search_Lucene
  26. * @subpackage Index
  27. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. */
  30. class Zend_Search_Lucene_Index_TermInfo
  31. {
  32. /**
  33. * The number of documents which contain the term.
  34. *
  35. * @var integer
  36. */
  37. public $docFreq;
  38. /**
  39. * Data offset in a Frequencies file.
  40. *
  41. * @var integer
  42. */
  43. public $freqPointer;
  44. /**
  45. * Data offset in a Positions file.
  46. *
  47. * @var integer
  48. */
  49. public $proxPointer;
  50. /**
  51. * ScipData offset in a Frequencies file.
  52. *
  53. * @var integer
  54. */
  55. public $skipOffset;
  56. /**
  57. * Term offset of the _next_ term in a TermDictionary file.
  58. * Used only for Term Index
  59. *
  60. * @var integer
  61. */
  62. public $indexPointer;
  63. public function __construct($docFreq, $freqPointer, $proxPointer, $skipOffset, $indexPointer = null)
  64. {
  65. $this->docFreq = $docFreq;
  66. $this->freqPointer = $freqPointer;
  67. $this->proxPointer = $proxPointer;
  68. $this->skipOffset = $skipOffset;
  69. $this->indexPointer = $indexPointer;
  70. }
  71. }