Java Doc for Searchable.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) 


org.apache.lucene.search.Searchable

All known Subclasses:   org.apache.lucene.search.RemoteSearchable,  org.apache.lucene.search.Searcher,
Searchable
public interface Searchable extends java.rmi.Remote(Code)
The interface for search implementations.

Searchable is the abstract network protocol for searching. Implementations provide search over a single index, over multiple indices, and over indices on remote servers.

Queries, filters and sort criteria are designed to be compact so that they may be efficiently passed to a remote index, with only the top-scoring hits being returned, rather than every non-zero scoring hit.





Method Summary
 voidclose()
     Frees resources associated with this Searcher.
 Documentdoc(int i)
     Expert: Returns the stored fields of document i.
 Documentdoc(int n, FieldSelector fieldSelector)
     Get the org.apache.lucene.document.Document at the nth position.
 intdocFreq(Term term)
     Expert: Returns the number of documents containing term.
 int[]docFreqs(Term[] terms)
     Expert: For each term in the terms array, calculates the number of documents containing term.
 Explanationexplain(Weight weight, int doc)
     Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
 intmaxDoc()
     Expert: Returns one greater than the largest possible document number.
 Queryrewrite(Query query)
     Expert: called to re-write queries into primitive queries.
 voidsearch(Weight weight, 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.

 TopDocssearch(Weight weight, Filter filter, int n)
     Expert: Low-level search implementation.
 TopFieldDocssearch(Weight weight, Filter filter, int n, Sort sort)
     Expert: Low-level search implementation with arbitrary sorting.



Method Detail
close
void close() throws IOException(Code)
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects like Hits .



doc
Document doc(int i) throws CorruptIndexException, IOException(Code)
Expert: Returns the stored fields of document i. Called by HitCollector implementations.
See Also:   IndexReader.document(int)
throws:
  CorruptIndexException - if the index is corrupt
throws:
  IOException - if there is a low-level IO error



doc
Document doc(int n, FieldSelector fieldSelector) throws CorruptIndexException, IOException(Code)
Get the org.apache.lucene.document.Document at the nth position. The org.apache.lucene.document.FieldSelector may be used to determine what org.apache.lucene.document.Field s to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy org.apache.lucene.document.Field is loaded an exception may be thrown. If you want the value of a lazy org.apache.lucene.document.Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.
Parameters:
  n - Get the document at the nth position
Parameters:
  fieldSelector - The org.apache.lucene.document.FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded. The stored fields of the org.apache.lucene.document.Document at the nth position
throws:
  CorruptIndexException - if the index is corrupt
throws:
  IOException - if there is a low-level IO error
See Also:   IndexReader.document(intFieldSelector)
See Also:   org.apache.lucene.document.Fieldable
See Also:   org.apache.lucene.document.FieldSelector
See Also:   org.apache.lucene.document.SetBasedFieldSelector
See Also:   org.apache.lucene.document.LoadFirstFieldSelector



docFreq
int docFreq(Term term) throws IOException(Code)
Expert: Returns the number of documents containing term. Called by search code to compute term weights.
See Also:   IndexReader.docFreq(Term)



docFreqs
int[] docFreqs(Term[] terms) throws IOException(Code)
Expert: For each term in the terms array, calculates the number of documents containing term. Returns an array with these document frequencies. Used to minimize number of remote calls.



explain
Explanation explain(Weight weight, int doc) throws IOException(Code)
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

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.

Applications should call Searcher.explain(Queryint) .
throws:
  BooleanQuery.TooManyClauses -




maxDoc
int maxDoc() throws IOException(Code)
Expert: Returns one greater than the largest possible document number. Called by search code to compute term weights.
See Also:   IndexReader.maxDoc



rewrite
Query rewrite(Query query) throws IOException(Code)
Expert: called to re-write queries into primitive queries.
throws:
  BooleanQuery.TooManyClauses -



search
void search(Weight weight, 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:
  weight - to match documents
Parameters:
  filter - if non-null, a bitset used to eliminate some documents
Parameters:
  results - to receive hits
throws:
  BooleanQuery.TooManyClauses -




search
TopDocs search(Weight weight, 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
TopFieldDocs search(Weight weight, 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 -




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