星期二, 12月 13, 2011

[Alfresco] Search API


Search API Example:
  var def =
  {
     query: "cm:name:test*",
     language: "fts-alfresco"
  };
  var results = search.query(def);

Parameters
search
{
   query: string,          mandatory, in appropriate format and encoded for the given language
   store: string,          optional, defaults to 'workspace://SpacesStore'
   language: string,       optional, one of: lucene, xpath, jcr-xpath, fts-alfresco - defaults to 'lucene'
   templates: [],          optional, Array of query language template objects (see below) - if supported by the language 
   sort: [],               optional, Array of sort column objects (see below) - if supported by the language
   page: object,           optional, paging information object (see below) - if supported by the language
   namespace: string,      optional, the default namespace for properties
   defaultField: string,   optional, the default field for query elements when not explicit in the query
   onerror: string         optional, result on error - one of: exception, no-results - defaults to 'exception'
}

sort
{
   column: string,         mandatory, sort column in appropriate format for the language
   ascending: boolean      optional, defaults to false
}

page
{
   maxItems: int,          optional, max number of items to return in result set
   skipCount: int          optional, number of items to skip over before returning results
}

template
{
   field: string,          mandatory, custom field name for the template
   template: string        mandatory, query template replacement for the template
}

Reference:
Full Text Search Query Syntax
Alfresco.util.DataTable and search maxItems 

2 則留言:

  1. 先生,您好
    敝姓趙是一家電子公司的 MIS,最近公司老闆要我安裝測試 Alfresco,小弟感覺 Alfresco 功能強大但很複雜到現在還是摸不著邊,因為老板驗收在即,尋遍網路幾乎國內鮮有人研究 Alfresco,讓小弟痛苦萬分幸好皇天不負苦心人,看到閣下在網路上發表 Alfresco 相關文章,小弟可否向閣下墾請相關協助.謝謝!!
    小弟 E-mail:david.chao@ewinsonic.com
    Tel:03-3704789

    回覆刪除
  2. 我想你到alfresco wiki上有很多如何把alfresco裝起來的教學。敝公司安裝環境的工作不在我身上,所以我可能無法提供你實務架站上的程序。

    回覆刪除

留個話吧:)