Lucene Language
This is the recommended language as it is supported by the recommended indexer.The query language is described on the Lucene site http://lucene.apache.org/java/2_4_0/queryparsersyntax.html. The QueryParser has been modified to allow wild cards at the start of wild card query elements otherwise the syntax is the same.
Note that certain characters need to be escaped in the query string. There is support to do this on a static method on the LuceneQueryParser.
The following fields are available
- ASPECT
- All the aspects of the node
- Tokenised as the fully qualified qname of each aspect
- FTSSTATUS
- Indicates if there are attributes waiting to be indexed in the back ground. Could be used to indicate that full text searches may be out of date matches
- ID
- The id from the node reference - all nodes in the index are from the same store
- A UUID
ID:workspace\://SpacesStore/4ee34168-495a-46cd-bfd8-6f7590a4c0ce
- PARENT
- All the parent IDs (UUIDs)
- PATH
- An XPATH expression used to select nodes
- This should only be access via a phrase query (ie in "") as it requires special tokenisation
- PRIMARYPARENT
- The ID of the primary parent node
- QNAME
- All the QNames by which this node is known in its parents
- Should be queried using phrases as it requires special tokenisation
- TEXT
- The full text representation of the node content
- TYPE
- The fully qualified type of the node
- @{namespace-uri}name
The following fields are used internally
- ANCESTOR
- ISCONTAINER
- ISROOT
- ISNODE
- TX
Lucene Query Sample:
search system users
PATH:"/sys:system/sys:people/*"
search the system user
PATH:"/sys:system/sys:people/cm:ken"
Reference:
Search_Documentation#Lucene_Language
Search#Lucene
Step-By-Step: Creating A Custom Model
Data Dictionary Guide
Alfresco Namespaces
Model UML Class Diagrams
沒有留言:
張貼留言
留個話吧:)