Java Doc for Searcher.java in  » Net » lucene-connector » org » apache » lucene » search » 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 » Net » lucene connector » org.apache.lucene.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.lucene.search.Searcher

All known Subclasses:   org.apache.lucene.search.IndexSearcher,  org.apache.lucene.search.MultiSearcher,
Searcher
abstract public class Searcher implements Searchable(Code)
An abstract base class for search implementations. Implements the main search methods.

Note that you can only access Hits from a Searcher as long as it is not yet closed, otherwise an IOException will be thrown.





Method Summary
abstract public  voidclose()
    
protected  WeightcreateWeight(Query query)
    
abstract public  Documentdoc(int i)
    
abstract public  intdocFreq(Term term)
    
public  int[]docFreqs(Term[] terms)
    
public  Explanationexplain(Query query, int doc)
     Returns an Explanation that describes how doc scored against query.
abstract public  Explanationexplain(Weight weight, int doc)
    
public  SimilaritygetSimilarity()
     Expert: Return the Similarity implementation used by this Searcher.
abstract public  intmaxDoc()
    
abstract public  Queryrewrite(Query query)
    
final public  Hitssearch(Query query)
     Returns the documents matching query.
public  Hitssearch(Query query, Filter filter)
     Returns the documents matching query and filter.
public  Hitssearch(Query query, Sort sort)
     Returns documents matching query sorted by sort.
public  Hitssearch(Query query, Filter filter, Sort sort)
     Returns documents matching query and filter, sorted by sort.
public  TopFieldDocssearch(Query query, Filter filter, int n, Sort sort)
     Expert: Low-level search implementation with arbitrary sorting.
public  voidsearch(Query query, HitCollector results)
     Lower-level search API.

HitCollector.collect(intfloat) is called for every non-zero scoring document.

Applications should only use this if they need all of the matching documents.

public  voidsearch(Query query, Filter filter, HitCollector results)
     Lower-level search API.

HitCollector.collect(intfloat) is called for every non-zero scoring document.
HitCollector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents.

public  TopDocssearch(Query query, Filter filter, int n)
     Expert: Low-level search implementation.
abstract public  voidsearch(Weight weight, Filter filter, HitCollector results)
    
abstract public  TopDocssearch(Weight weight, Filter filter, int n)
    
abstract public  TopFieldDocssearch(Weight weight, Filter filter, int n, Sort sort)
    
public  voidsetSimilarity(Similarity similarity)
     Expert: Set the Similarity implementation used by this Searcher.



Method Detail
close
abstract public void close() throws IOException(Code)



createWeight
protected Weight createWeight(Query query) throws IOException(Code)
creates a weight for query new weight



doc
abstract public Document doc(int i) throws CorruptIndexException, IOException(Code)



docFreq
abstract public int docFreq(Term term) throws IOException(Code)



docFreqs
public int[] docFreqs(Term[] terms) throws IOException(Code)



explain
public Explanation explain(Query query, int doc) throws IOException(Code)
Returns an Explanation that describes how doc scored against query.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.




explain
abstract public Explanation explain(Weight weight, int doc) throws IOException(Code)



getSimilarity
public Similarity getSimilarity()(Code)
Expert: Return the Similarity implementation used by this Searcher.

This defaults to the current value of Similarity.getDefault .




maxDoc
abstract public int maxDoc() throws IOException(Code)



rewrite
abstract public Query rewrite(Query query) throws IOException(Code)



search
final public Hits search(Query query) throws IOException(Code)
Returns the documents matching query.
throws:
  BooleanQuery.TooManyClauses -



search
public Hits search(Query query, Filter filter) throws IOException(Code)
Returns the documents matching query and filter.
throws:
  BooleanQuery.TooManyClauses -



search
public Hits search(Query query, Sort sort) throws IOException(Code)
Returns documents matching query sorted by sort.
throws:
  BooleanQuery.TooManyClauses -



search
public Hits search(Query query, Filter filter, Sort sort) throws IOException(Code)
Returns documents matching query and filter, sorted by sort.
throws:
  BooleanQuery.TooManyClauses -



search
public TopFieldDocs search(Query query, Filter filter, int n, Sort sort) throws IOException(Code)
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call Searcher.search(QueryFilterSort) instead.
throws:
  BooleanQuery.TooManyClauses -




search
public void search(Query query, HitCollector results) throws IOException(Code)
Lower-level search API.

HitCollector.collect(intfloat) is called for every non-zero scoring document.

Applications should only use this if they need all of the matching documents. The high-level search API ( Searcher.search(Query) ) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.
throws:
  BooleanQuery.TooManyClauses -




search
public void search(Query query, Filter filter, HitCollector results) throws IOException(Code)
Lower-level search API.

HitCollector.collect(intfloat) is called for every non-zero scoring document.
HitCollector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API ( Searcher.search(Query) ) is usually more efficient, as it skips non-high-scoring hits.
Parameters:
  query - to match documents
Parameters:
  filter - if non-null, a bitset used to eliminate some documents
Parameters:
  results - to receive hits
throws:
  BooleanQuery.TooManyClauses -




search
public TopDocs search(Query query, Filter filter, int n) throws IOException(Code)
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Called by Hits .

Applications should usually call Searcher.search(Query) or Searcher.search(QueryFilter) instead.
throws:
  BooleanQuery.TooManyClauses -




search
abstract public void search(Weight weight, Filter filter, HitCollector results) throws IOException(Code)



search
abstract public TopDocs search(Weight weight, Filter filter, int n) throws IOException(Code)



search
abstract public TopFieldDocs search(Weight weight, Filter filter, int n, Sort sort) throws IOException(Code)



setSimilarity
public void setSimilarity(Similarity similarity)(Code)
Expert: Set the Similarity implementation used by this Searcher.
See Also:   Similarity.setDefault(Similarity)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.