Java Doc for LuceneHelper.java in  » Search-Engine » compass-2.0 » org » compass » core » lucene » util » 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 » compass 2.0 » org.compass.core.lucene.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.compass.core.lucene.util.LuceneHelper

LuceneHelper
abstract public class LuceneHelper (Code)
Allows to create Compass related objects based on external (internally no supported by Compass) Lucene objects.
author:
   kimchy




Method Summary
public static  CompassQuerycreateCompassQuery(CompassSession session, Query query)
     Creates a new CompassQuery based on a Lucene Query .
public static  CompassQueryFiltercreateCompassQueryFilter(CompassSession session, Filter filter)
     Creates a new CompassQueryFilter based on a Lucene Filter .
public static  DirectorygetDirectory(Compass compass, String subIndex)
     Returns the lucene org.apache.lucene.store.Directory associated with the given sub index.
public static  DocumentgetDocument(Resource resource)
     Returns the actual Lucene Document that the Resource wraps.
public static  LuceneAnalyzerManagergetLuceneAnalyzerManager(Compass compass)
     Returns Compass own internal LuceneAnalyzerManager.
public static  LuceneSearchEngineInternalSearchgetLuceneInternalSearch(CompassSession session)
     Returns the given search engine "internals" used for search.
public static  LuceneSearchEngineInternalSearchgetLuceneInternalSearch(CompassSession session, String[] subIndexes, String[] aliases)
     Returns the given search engine "internals" used for search.
public static  LuceneSearchEngineHitsgetLuceneSearchEngineHits(CompassHits hits)
     Returns the underlying LuceneSearchEngineHits of the given CompassHits .
public static  LuceneSearchEngineQuerygetLuceneSearchEngineQuery(CompassQuery query)
     Returns the underlying LuceneSearchEngineQuery of the given CompassQuery .
public static  LuceneSearchEngineQueryFiltergetLuceneSearchEngineQueryFilter(CompassQueryFilter filter)
     Returns the underlying LuceneSearchEngineQueryFilter of the given CompassQueryFilter .
public static  TermFreqVectorgetTermFreqVector(CompassSession session, Resource resource, String propertyName)
     Returns Lucene TermFreqVector for the given property and resource, using the session.
public static  TermFreqVector[]getTermFreqVectors(CompassSession session, Resource resource)
     Returns Lucene TermFreqVector using the given Compass session and Resource .



Method Detail
createCompassQuery
public static CompassQuery createCompassQuery(CompassSession session, Query query)(Code)
Creates a new CompassQuery based on a Lucene Query .

Allows to create CompassQuery based on external Lucene Query that is not supported by one of Compass query builders.
Parameters:
  session - Comapss session
Parameters:
  query - The lucene query to wrap A compass query wrapping the lucene query




createCompassQueryFilter
public static CompassQueryFilter createCompassQueryFilter(CompassSession session, Filter filter)(Code)
Creates a new CompassQueryFilter based on a Lucene Filter .

Allows to create CompassQueryFilter based on external Lucene Filter that is not supported by one fo Comapss query filter builders.
Parameters:
  session - Comapss session
Parameters:
  filter - The lucene filter to wrap A compass query filter wrapping lucene query.




getDirectory
public static Directory getDirectory(Compass compass, String subIndex)(Code)
Returns the lucene org.apache.lucene.store.Directory associated with the given sub index.



getDocument
public static Document getDocument(Resource resource)(Code)
Returns the actual Lucene Document that the Resource wraps.
Parameters:
  resource - The resource to get the document from The Lucene document that resource wraps



getLuceneAnalyzerManager
public static LuceneAnalyzerManager getLuceneAnalyzerManager(Compass compass)(Code)
Returns Compass own internal LuceneAnalyzerManager. Can be used to access Lucene org.apache.lucene.analysis.Analyzer at runtime.



getLuceneInternalSearch
public static LuceneSearchEngineInternalSearch getLuceneInternalSearch(CompassSession session)(Code)
Returns the given search engine "internals" used for search. For Lucene, returns LuceneSearchEngineInternalSearch which allows to access Lucene org.apache.lucene.index.IndexReader and org.apache.lucene.search.Searcher .

The search intenrals will be ones that are executed against the whole index. In order to search on specific aliases or sub indexes, please use LuceneHelper.getLuceneInternalSearch(org.compass.core.CompassSession,String[],String[]) .
Parameters:
  session - A compass session within a transaction Lucene search "internals"




getLuceneInternalSearch
public static LuceneSearchEngineInternalSearch getLuceneInternalSearch(CompassSession session, String[] subIndexes, String[] aliases)(Code)
Returns the given search engine "internals" used for search. For Lucene, returns LuceneSearchEngineInternalSearch which allows to access Lucene org.apache.lucene.index.IndexReader and org.apache.lucene.search.Searcher .

The search can be narrowed down to specific sub indexes or aliases. A null value means all the sub indexes/aliases.
Parameters:
  session - A compass sessino within a transaction
Parameters:
  subIndexes - A set of sub indexes to narrow down the index scope
Parameters:
  aliases - A set of aliases to narrow down the index scope Lucene search "internals"




getLuceneSearchEngineHits
public static LuceneSearchEngineHits getLuceneSearchEngineHits(CompassHits hits)(Code)
Returns the underlying LuceneSearchEngineHits of the given CompassHits .

Used mainly to access the actual Lucene org.apache.lucene.search.Hits , or get Lucene org.apache.lucene.search.Explanation .




getLuceneSearchEngineQuery
public static LuceneSearchEngineQuery getLuceneSearchEngineQuery(CompassQuery query)(Code)
Returns the underlying LuceneSearchEngineQuery of the given CompassQuery .

Can be used for example to add custom Sorting using LuceneSearchEngineQuery.addSort(org.apache.lucene.search.SortField) , or get the actual lucene query using org.compass.core.lucene.engine.LuceneSearchEngineQuery.getQuery .
Parameters:
  query - The compass query to extract the lucene search engine query from The lucene search engine query extracted from the compass query




getLuceneSearchEngineQueryFilter
public static LuceneSearchEngineQueryFilter getLuceneSearchEngineQueryFilter(CompassQueryFilter filter)(Code)
Returns the underlying LuceneSearchEngineQueryFilter of the given CompassQueryFilter .

Can be used to get the actual Lucene Filter using org.compass.core.lucene.engine.LuceneSearchEngineQueryFilter.getFilter .
Parameters:
  filter - The compass query filter to extract the lucene search engine query filter from The lucene search engine query filter extracted from the compass query filter




getTermFreqVector
public static TermFreqVector getTermFreqVector(CompassSession session, Resource resource, String propertyName) throws SearchEngineException(Code)
Returns Lucene TermFreqVector for the given property and resource, using the session.
Parameters:
  session - Compass session
Parameters:
  resource - The resource to get the term freq vector for
Parameters:
  propertyName - Theh property name (Lucene field name) to get the term freq vector for Teh term info freq vector for the given resource and property
throws:
  SearchEngineException -



getTermFreqVectors
public static TermFreqVector[] getTermFreqVectors(CompassSession session, Resource resource) throws SearchEngineException(Code)
Returns Lucene TermFreqVector using the given Compass session and Resource .
Parameters:
  session - Compass session
Parameters:
  resource - The resource to get the term freq vector for The term infos freq vector for the given resource
throws:
  SearchEngineException -



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.