Java Doc for MultiTermIndexIterator.java in  » Search-Engine » mg4j » it » unimi » dsi » mg4j » index » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » mg4j » it.unimi.dsi.mg4j.index 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


it.unimi.dsi.mg4j.search.AbstractUnionDocumentIterator
   it.unimi.dsi.mg4j.index.MultiTermIndexIterator

MultiTermIndexIterator
public class MultiTermIndexIterator extends AbstractUnionDocumentIterator implements IndexIterator(Code)
A virtual that merges several component index iterators.

This class adds to it.unimi.dsi.mg4j.search.AbstractUnionDocumentIterator an interval interator generating the OR of the intervals returned for each of the documents involved. The main difference with an OrDocumentIterator built on the same array of component iterators is that this class implements IndexIterator and hence provides a MultiTermIndexIterator.count() (the sum of counts of those component iterators positioned on the current document) and a MultiTermIndexIterator.frequency() . The latter is by default the maximum frequency of a component iterator, but it can be set at MultiTermIndexIterator.getInstance(intIndexIndexIterator[]) construction time .

The main raison d'être of this class is support for query expansion: a blind application of OrDocumentIterator to an array of index iterators would mislead scorers such as BM25Scorer because low-frequency terms (e.g., hapax legomena) would be responsible for most of the score.



Field Summary
protected  intid
     The id of this iterator.
protected  Stringterm
     The term of this iterator.

Constructor Summary
protected  MultiTermIndexIterator(int defaultFrequency, IndexIterator... indexIterator)
     Creates a new document iterator that merges the given array of iterators.

Method Summary
public  booleanaccept(DocumentIteratorVisitor visitor)
    
public  booleanacceptOnTruePaths(DocumentIteratorVisitor visitor)
    
public  intcount()
     The count is the sum of counts of those component iterators positioned on the current document.
public  intfrequency()
     The frequency is either the default frequency set at construction time, or the maximum frequency of the component iterators.
protected  IntervalIteratorgetComposedIntervalIterator(Index index)
    
public static  IndexIteratorgetInstance(IndexIterator... indexIterator)
     Returns an index iterator that merges the given array of iterators. This method requires that at least one iterator is provided.
public static  IndexIteratorgetInstance(Index index, IndexIterator... indexIterator)
     Returns an index iterator that merges the given array of iterators.

Note that the special case of the empty and of the singleton arrays are handled efficiently.

public static  IndexIteratorgetInstance(int defaultFrequency, IndexIterator... indexIterator)
     Returns an index iterator that merges the given array of iterators. This method requires that at least one iterator is provided.
Parameters:
  defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max).
Parameters:
  indexIterator - the iterators to be joined (at least one).
public static  IndexIteratorgetInstance(int defaultFrequency, Index index, IndexIterator... indexIterator)
     Returns an index iterator that merges the given array of iterators.

Note that the special case of the empty and of the singleton arrays are handled efficiently.

public  voidid(int id)
    
public  intid()
    
public  Indexindex()
    
public  intnextDocument()
    
public  Payloadpayload()
     This method is not implemented by this class.
public  int[]positionArray()
    
public  IntIteratorpositions()
    
public  intpositions(int[] position)
    
public  intskipTo(int n)
    
public  voidterm(CharSequence term)
    
public  Stringterm()
    
public  inttermNumber()
    

Field Detail
id
protected int id(Code)
The id of this iterator.



term
protected String term(Code)
The term of this iterator.




Constructor Detail
MultiTermIndexIterator
protected MultiTermIndexIterator(int defaultFrequency, IndexIterator... indexIterator) throws IOException(Code)
Creates a new document iterator that merges the given array of iterators.
Parameters:
  defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max).
Parameters:
  indexIterator - the iterators to be joined.




Method Detail
accept
public boolean accept(DocumentIteratorVisitor visitor) throws IOException(Code)



acceptOnTruePaths
public boolean acceptOnTruePaths(DocumentIteratorVisitor visitor) throws IOException(Code)



count
public int count() throws IOException(Code)
The count is the sum of counts of those component iterators positioned on the current document. the sum of counts.



frequency
public int frequency() throws IOException(Code)
The frequency is either the default frequency set at construction time, or the maximum frequency of the component iterators. the frequency.



getComposedIntervalIterator
protected IntervalIterator getComposedIntervalIterator(Index index)(Code)



getInstance
public static IndexIterator getInstance(IndexIterator... indexIterator) throws IOException(Code)
Returns an index iterator that merges the given array of iterators. This method requires that at least one iterator is provided. The frequency is computed as a max, and MultiTermIndexIterator.index() will return the result of the same method on the first iterator.
Parameters:
  indexIterator - the iterators to be joined (at least one). a merged index iterator.
throws:
  IllegalArgumentException - if no iterators were provided.



getInstance
public static IndexIterator getInstance(Index index, IndexIterator... indexIterator) throws IOException(Code)
Returns an index iterator that merges the given array of iterators.

Note that the special case of the empty and of the singleton arrays are handled efficiently. The frequency is computed as a max, and MultiTermIndexIterator.index() will return index.
Parameters:
  index - the index that wil be returned by MultiTermIndexIterator.index().
Parameters:
  indexIterator - the iterators to be joined. a merged index iterator.




getInstance
public static IndexIterator getInstance(int defaultFrequency, IndexIterator... indexIterator) throws IOException(Code)
Returns an index iterator that merges the given array of iterators. This method requires that at least one iterator is provided.
Parameters:
  defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max).
Parameters:
  indexIterator - the iterators to be joined (at least one). a merged index iterator.
throws:
  IllegalArgumentException - if no iterators were provided, or they run on different indices.



getInstance
public static IndexIterator getInstance(int defaultFrequency, Index index, IndexIterator... indexIterator) throws IOException(Code)
Returns an index iterator that merges the given array of iterators.

Note that the special case of the empty and of the singleton arrays are handled efficiently.
Parameters:
  defaultFrequency - the default term frequency (or Integer.MIN_VALUE for the max).
Parameters:
  index - the index that wil be returned by MultiTermIndexIterator.index().
Parameters:
  indexIterator - the iterators to be joined. a merged index iterator.
throws:
  IllegalArgumentException - if there is some iterator on an index different from index.




id
public void id(int id)(Code)



id
public int id()(Code)



index
public Index index()(Code)



nextDocument
public int nextDocument() throws IOException(Code)



payload
public Payload payload()(Code)
This method is not implemented by this class.



positionArray
public int[] positionArray() throws IOException(Code)



positions
public IntIterator positions() throws IOException(Code)



positions
public int positions(int[] position) throws IOException(Code)



skipTo
public int skipTo(int n) throws IOException(Code)



term
public void term(CharSequence term)(Code)



term
public String term()(Code)



termNumber
public int termNumber()(Code)



Fields inherited from it.unimi.dsi.mg4j.search.AbstractUnionDocumentIterator
final protected int[] curr(Code)(Java Doc)
final protected int[] front(Code)(Java Doc)
protected int frontSize(Code)(Java Doc)
final protected IntHeapSemiIndirectPriorityQueue queue(Code)(Java Doc)

Methods inherited from it.unimi.dsi.mg4j.search.AbstractUnionDocumentIterator
public boolean acceptOnTruePaths(DocumentIteratorVisitor visitor) throws IOException(Code)(Java Doc)
protected int computeFront()(Code)(Java Doc)
abstract protected IntervalIterator getComposedIntervalIterator(Index index)(Code)(Java Doc)
public IntervalIterator intervalIterator(Index index) throws IOException(Code)(Java Doc)
public Reference2ReferenceMap<Index, IntervalIterator> intervalIterators() throws IOException(Code)(Java Doc)
public int nextDocument() throws IOException(Code)(Java Doc)
public int skipTo(int n) throws IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.