星期三, 12月 29, 2010

[Alfresco] Lucene Language Note

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
    Attributes as fields
    • @{namespace-uri}name
    Attributes should be searched using phrase expressions.

    The following fields are used internally
    • ANCESTOR
    • ISCONTAINER
    • ISROOT
    • ISNODE
    • TX  
    Alfresco Namespace List

    Namespace Common Prefix Description
    http://www.alfresco.org alf General Alfresco Namespace
    http://www.alfresco.org/model/dictionary/1.0d Data Dictionary model
    http://www.alfresco.org/model/system/1.0 sys Repository system model
    http://www.alfresco.org/model/content/1.0 cm Content Domain model
    http://www.alfresco.org/model/application/1.0 app Application model
    http://www.alfresco.org/model/bpm/1.0 bpm Business Process Model
    http://www.alfresco.org/model/site/1.0 stSite Model
    http://www.alfresco.org/model/forum/1.0 fm Forum Model
    http://www.alfresco.org/model/user/1.0 usr User model (in repository.jar)
    http://www.alfresco.org/view/repository/1.0 view Alfresco Import / Export View
    http://www.alfresco.org/model/action/1.0 act Action service model
    http://www.alfresco.org/model/rule/1.0 rule Rule service model
    http://www.alfresco.org/ws/service/authentication/1.0 auth Authentication Web Service
    http://www.alfresco.org/ws/service/repository/1.0 rep Repository Web Service
    http://www.alfresco.org/ws/service/content/1.0 content Content Web Service
    http://www.alfresco.org/ws/service/authoring/1.0 author Authoring Web Service
    http://www.alfresco.org/ws/service/classification/1.0 cls Classification Web Service
    http://www.alfresco.org/ws/cml/1.0 cml Content Manipulation Language
    http://www.alfresco.org/ws/model/content/1.0 cm Web Service Content Domain Model
    http://www.alfresco.org/ws/headers/1.0 hdr SOAP Headers
    http://www.alfresco.org/model/workflow/1.0 wfWorkflow Model(link is to Alfresco simple workflow model, not generally extended)

    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

    沒有留言:

    張貼留言

    留個話吧:)

    其他你感興趣的文章

    Related Posts with Thumbnails