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


org.compass.core.CompassQuery

All known Subclasses:   org.compass.core.impl.DefaultCompassQuery,
CompassQuery
public interface CompassQuery (Code)
An object representing a Compass query. The query is created using the org.compass.core.CompassQueryBuilder , and used to get the matching org.compass.core.CompassHits .

The query be sorted as well using one of the addSort operations. Note that adding sorting is only applicable for the query that will execute the CompassQuery.hits() operation.
author:
   kimchy


Inner Class :public static interface CompassSpanQuery extends CompassQuery
Inner Class :final public static class SortDirection extends Parameter
Inner Class :final public static class SortPropertyType extends Parameter
Inner Class :final public static class SortImplicitType extends Parameter



Method Summary
 CompassQueryaddSort(String propertyName)
     Adds sorting on the given property name.
 CompassQueryaddSort(String propertyName, SortDirection direction)
     Adds sorting on the given property name.
 CompassQueryaddSort(String propertyName, SortPropertyType type)
     Adds sorting on the given property name, and using the given property type.
 CompassQueryaddSort(String propertyName, SortPropertyType type, SortDirection direction)
     Adds sorting on the given property name, and using the given property type.
 CompassQueryaddSort(SortImplicitType implicitType)
     Adds sorting on implicit types, which are not direct properties values.
 CompassQueryaddSort(SortImplicitType implicitType, SortDirection direction)
     Adds sorting on implicit types, which are not direct properties values.
 Objectclone()
     Clones the given query.
 longcount()
     Returns the count of hits that match this query.
 CompassQueryFiltergetFilter()
     Returns the filter set using CompassQuery.setFilter(CompassQueryFilter) .
 CompassQuerygetSuggestedQuery()
     Returns the suggested query (based on spell check).
 CompassHitshits()
     Performs the search and returns the hits that match the qeury.
 booleanisSuggested()
     Returns true if this is a suggested query.
 CompassQueryrewrite()
     Causes the query to be rewritten before executed to search.
 CompassQuerysetAliases(String... aliases)
     Narrows down the query to be executed only against the given aliases.
 CompassQuerysetBoost(float boost)
     Sets the boost for this query to boost.
 CompassQuerysetFilter(CompassQueryFilter filter)
     Sets a filter to the query.
 CompassQuerysetSubIndexes(String... subIndexes)
     Narrows down the query to be executed only against the given sub indexes.
 CompassQuerysetTypes(Class... types)
     Narrows down the query to be executed only against the given types.



Method Detail
addSort
CompassQuery addSort(String propertyName)(Code)
Adds sorting on the given property name. The type of sorting will be identified automatically (though it is preferable to specify it in advance using the CompassQuery.addSort(String,SortPropertyType) .

Note that the property must be UN_TOKENIZED, and stored.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  propertyName - The property name that will be sorted.




addSort
CompassQuery addSort(String propertyName, SortDirection direction)(Code)
Adds sorting on the given property name. The type of sorting will be identified automatically (though it is preferable to specify it in advance using the CompassQuery.addSort(String,SortPropertyType) .

Note that the property must be UN_TOKENIZED, and stored.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  propertyName - The property name that will be sorted.
Parameters:
  direction - The direction for the sorting. the query




addSort
CompassQuery addSort(String propertyName, SortPropertyType type)(Code)
Adds sorting on the given property name, and using the given property type. Note that INT has the lowest memorty requirements and STRING the most.

Note that the property must be UN_TOKENIZED, and stored.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  propertyName - The property name that will be sorted.
Parameters:
  type - The type of the propert. the query




addSort
CompassQuery addSort(String propertyName, SortPropertyType type, SortDirection direction)(Code)
Adds sorting on the given property name, and using the given property type. Note that INT has the lowest memorty requirements and STRING the most.

Note that the property must be UN_TOKENIZED, and stored.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  propertyName - The property name that will be sorted.
Parameters:
  type - The type of the propert.
Parameters:
  direction - The direction of the sorting. the query




addSort
CompassQuery addSort(SortImplicitType implicitType)(Code)
Adds sorting on implicit types, which are not direct properties values.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  implicitType - The implicit type to add sorting on.




addSort
CompassQuery addSort(SortImplicitType implicitType, SortDirection direction)(Code)
Adds sorting on implicit types, which are not direct properties values.

Note, that the sort option will only work on the outer most query (i.e. the one that the hits is called on).
Parameters:
  implicitType - The implicit type to add sorting on.
Parameters:
  direction - The direction of the sorting.




clone
Object clone() throws CloneNotSupportedException(Code)
Clones the given query.



count
long count()(Code)
Returns the count of hits that match this query. Note, this will be faster than CompassHitsOperations.length .



getFilter
CompassQueryFilter getFilter()(Code)
Returns the filter set using CompassQuery.setFilter(CompassQueryFilter) . null if none is set. The filter set using CompassQuery.setFilter(CompassQueryFilter)



getSuggestedQuery
CompassQuery getSuggestedQuery()(Code)
Returns the suggested query (based on spell check). If spell check is disabled the same query is returned.

In order to know if the query was actually replaced with a suggested one, call CompassQuery.isSuggested .




hits
CompassHits hits() throws CompassException(Code)
Performs the search and returns the hits that match the qeury.



isSuggested
boolean isSuggested()(Code)
Returns true if this is a suggested query. For example, when performing a search query with spell check enabled, then it will return true if the query was modified to correct some spelling mistakes.



rewrite
CompassQuery rewrite()(Code)
Causes the query to be rewritten before executed to search.



setAliases
CompassQuery setAliases(String... aliases)(Code)
Narrows down the query to be executed only against the given aliases. If set to null, will use all aliases.
Parameters:
  aliases - aliases the query will be executed against th query



setBoost
CompassQuery setBoost(float boost)(Code)
Sets the boost for this query to boost. Hits matching this query will (in addition to the normal weightings) have their score multiplied by boost.



setFilter
CompassQuery setFilter(CompassQueryFilter filter)(Code)
Sets a filter to the query. Please see CompassQueryFilterBuilder .
Parameters:
  filter - The filter for the query the query



setSubIndexes
CompassQuery setSubIndexes(String... subIndexes)(Code)
Narrows down the query to be executed only against the given sub indexes. If set to null, will use all sub indexes.
Parameters:
  subIndexes - sub indexes the query will be executed against The query



setTypes
CompassQuery setTypes(Class... types)(Code)
Narrows down the query to be executed only against the given types. Internally will translate the classes to the relevant root aliases and call CompassQuery.setAliases(String[]) .
Parameters:
  types - class types the query will be executed against the query



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