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


org.compass.annotations.Searchable

Searchable
public @interface Searchable(Code)
Marks a class as searchable. A searchable class is assoiated with an alias, and allows to perform full text search on it's mapped properties/fields.

The searchable class is associated with an alias, which can be used to reference the class when performing search operations, or for other mappings to extend it.

A class mapping has it's own fully functional index, unless using the Searchable.subIndex() to join several searchable classes into the same index (when joining several searchalbe classes into the same index, the search will be much faster, but updates perform locks on the sub index level, so it might slow it down).

A searchable class creates an internal "all" meta-data, which holds searchable information of all the class searchable content. You can control if it will be created or not using Searchable.enableAll() , and control the "all" property using the SearchableAllMetaData annotation.

A searchable class can have constant meta-data associated with it. They can be defined using the SearchableConstant and SearchableConstants .

Searchable class can have annotations defined on either it's fields, or on the field getter accessor. The possible annotions for them are: SearchableId , SearchableProperty , SearchableComponent , and SearchableReference . Note that collections are automatically detected and handled by Compass if annotated.

If the searchable class extends a class, or implement intefaces, they will be automatically detected and added to it in a revrse order. If the same annotaion is defined in both the searcable class and one of it's super class / interfaces, it will be overriden unless defined otherwise. The annotaions will be included even if the inteface/superclass do not implement the Searchable annotation.

The seachable class can have a specialized analyzer (different from the default one) associated with it using Searchable.analyzer() . Note, that this will associate the class statically with an analyzer. Dynamically associating the class with an analyzer, the SearchableAnalyzerProperty can be used to annotated the dynamic value for the analyzer to use.

The searchable class can extend other mappings defined elsewhere (either by the xml mappings, or annotations). Remember, that the searchable class will already include all the annotations in it's super class or interface (recursivly). So there is no need to specify them in Searchable.extend() . Note, that xml mapping contracts can be extended as well.

By default, the searchable class is defined as a root class. A root class is a top level searchable class. A non root class can be used to define mappings definitions for SearchableComponent , and it is preferable that classes that are only used as component mapping definitions, will be defined with Searchable.root() false.

The Searchable.poly() can be used to mapped polymprphic inheritance tree. This is the less prefable way to map an inhertiance tree, since the fact that a searchable class automatically inhertis all it's base class and interface mappings, means that the same result can be acheived by marking the all the inheritance tree classes as Searchable .

Compass provides it's own internal converter for searchable classes org.compass.core.converter.mapping.osem.ClassMappingConverter . For advance usage, the converter can be set using Searchable.converter() IT will convert the org.compass.core.mapping.osem.ClassMapping definitions.
author:
   kimchy
See Also:   SearchableId
See Also:   SearchableProperty
See Also:   SearchableComponent
See Also:   SearchableReference
See Also:   SearchableAnalyzerProperty



Field Summary
 Stringalias
     The alias that is associated with the class.
 Stringanalyzer
     A specialized analyzer (different from the default one) associated with the searchable class.
 floatboost
     Boost level for the searchable class.
 Stringconverter
     Allows to set a converter for the org.compass.core.mapping.osem.ClassMapping of the searchable class.
 String[]extend
     A list of aliases to extend.
 ManagedIdmanagedId
     Controls the managed id value for all the mapped properties that have no explicit setting of the managed id (also default to NA).
 booleanpoly
     Used to mapped polymprphic inheritance tree.
 ClasspolyClass
     In cases where poly is set to true, allows to set the class that will be used to instantiate in all inheritance tree cases.
 booleanroot
     Defines if the searchable class is a root class.
 SpellCheckspellCheck
     What is the default mode for the given searchable class in including/excluding properties from the spell check index.

If set to NA, will use the globablly defined mode.

 StringsubIndex
     The sub index the searchable class will be saved to.
 SupportUnmarshallsupportUnmarshall
     Controls if the searchable class will support unmarshalling from the search engine or using org.compass.core.Resource is enough.



Field Detail
alias
String alias(Code)
The alias that is associated with the class. Can be used to refernce the searchable class when performing search operations, or for other mappings to extend it.

Default value is the short name of the class.




analyzer
String analyzer(Code)
A specialized analyzer (different from the default one) associated with the searchable class. Note, that this will associate the class statically with an analyzer. Dynamically associating the class with an analyzer can be done by using the SearchableAnalyzerProperty to use the property value to dynamically lookup the value for the analyzer to use.



boost
float boost(Code)
Boost level for the searchable class. Controls the ranking of hits when performing searches.



converter
String converter(Code)
Allows to set a converter for the org.compass.core.mapping.osem.ClassMapping of the searchable class.

This is advance setting, since Compass comes with it's own internal org.compass.core.converter.mapping.osem.ClassMappingConverter .




extend
String[] extend(Code)
A list of aliases to extend. Extending the aliases allows to include other mapping definitions, defined via annotations or xml.

Remember, that the searchable class will already include all the annotations in it's super class or interface (recursivly). So there is no need to specify them in Searchable.extend() . Note, that xml mapping code>contracts can be extended as well.




managedId
ManagedId managedId(Code)
Controls the managed id value for all the mapped properties that have no explicit setting of the managed id (also default to NA). The default value for the managed id is derived from globabl Compass settings and defaults to AUTO.



poly
boolean poly(Code)
Used to mapped polymprphic inheritance tree. This is the less prefable way to map an inheritance tree, since the fact that a searchable class automatically inhertis all it's base class and interface mappings, means that the same result can be acheived by marking the all the inheritance tree classes as Searchable , in a more performant way.

If poly is set to true, the actual class implementation will be persisted to the index, later be used to instantiate it when un-marhsalling. If a specific class need to be used to instantiate all classes, use the { Searchable.polyClass() to set it.




polyClass
Class polyClass(Code)
In cases where poly is set to true, allows to set the class that will be used to instantiate in all inheritance tree cases.

If not set, the actual class will be saved to the index, later be used to instantiate it when un-marhsalling




root
boolean root(Code)
Defines if the searchable class is a root class. A root class is a top level searchable class. You should define the searchable class with false if it only acts as mapping definitions for a SearchableComponent .



spellCheck
SpellCheck spellCheck(Code)
What is the default mode for the given searchable class in including/excluding properties from the spell check index.

If set to NA, will use the globablly defined mode. If set the INCLUDE will automatically incldue all the given proeprties mappings unless specific properties are mapped with EXCLUDE. If set to EXCLUDE will automatically exclude all the given properties unless they are marked with INCLUDE.

A special note when both this is set to NA, and the global setting is set to NA as well (which is the default): In this case, Compass will use the all proeprty as the only property to add to the spell check index.




subIndex
String subIndex(Code)
The sub index the searchable class will be saved to. A sub index is a fully functional index.

When joining several searchalbe classes into the same index, the search will be much faster, but updates perform locks on the sub index level, so it might slow it down.

Defaults to the searchable class Searchable.alias() value.




supportUnmarshall
SupportUnmarshall supportUnmarshall(Code)
Controls if the searchable class will support unmarshalling from the search engine or using org.compass.core.Resource is enough. Un-marshalling is the process of converting a raw org.compass.core.Resource into the actual domain object. If support un-marshall is enabled extra information will be stored within the search engine, as well as consumes extra memory.

By default Compass global osem setting supportUnmarshall controls it unless exlicitly set here.






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