Class Index | File Index

Classes


Class Search

Builds an Advanced Search and returns the search results.
Defined in: search.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Search(search, fields, pageSize, pageNumber, sortDirection, sortField)
Builds an Advanced Search and returns the search results.
Class Detail
Search(search, fields, pageSize, pageNumber, sortDirection, sortField)
Builds an Advanced Search and returns the search results. Applies the configurations provided in 'search' to the Advanced Search, and returns the search results as AssetID's and field values. These values are parsed into a text object keyed by AssetID from the JSON file in which they are contained, and by default are displayed to the user.
/wf/restapi/1/search?search={conjunction:'and/or',criteria:[{schema:'Schema1',field:'Field1',condition:'(see below)',value:'Value1'},{schema:'Schema2',field:'Field2',condition:'(see below)',value:'Value2'}]}
http://127.0.0.1:55555/wf/restapi/1/search?search={"conjunction":"and","criteria":[{"schema":"http://purl.org/dc/elements/1.1/","field":"subject","condition":"not","value":""}]}
Parameters:
search
Used to fill out the Advanced Search parameters. The object structure is {conjunction:'..',criteria:[{schema:'..',field:'..',condition:'..',value:'..'}, {conjunction:'..',criteria:[]},... ]}
fields
The fields to grab. This is optional and will grab the fields in the search if this is not defined.
pageSize
default 100
pageNumber
default 0
sortDirection
"ASC" or "DESC"
sortField
the namespace of the desired field ex "record_id" or "http://purl.org/dc/elements/1.1/ subject"
Supported Search Conditions
  • Container Fields
    • cont
    • not_cont
    • not
    • null
    • cont_part
    • not_cont_part
  • Integer Fields
    • not
    • null
    • eq
    • ne
    • le
    • lt
    • ge
    • gt
    • anyval
    • notchanged
  • Hierarchy Fields
    • not
    • null
    • eq
    • ne
    • cont
    • not_cont
    • anyval
    • notchanged
  • Date Fields
    • not
    • null
    • eq
    • ne
    • le
    • lt
    • ge
    • gt
    • between
    • anyval
    • notchanged
  • Other Fields
    • not
    • null
    • eq
    • ne
    • beg
    • not_beg
    • end
    • not_end
    • cont
    • not_cont
    • bulkIs
    • bulkStart
    • all
    • any
    • phrase
    • wo
    • anyval
    • notchanged

English Translations
  • ne = Does not equal
  • lt = Less than
  • le = Less than or equal to
  • gt = Greater than
  • ge = Greater than or equal to
  • between = Between
  • cont = Contains
  • not_cont = Does not contain
  • beg = Begins with
  • not_beg = Does not begin with
  • end = Ends with
  • not_end = does not end with
  • null = is null
  • not = is not null
  • cont_part = Contains partial value
  • not_cont_part = Does not contain partial value
  • anyval = Any value
  • all = All words
  • any = Any Words
  • phrase = Has Exact phrase
  • wo = Without word
Returns:
( {"AssetID": {"name": "Name","Field1": "Asset Value for Field1","Field2": "Asset Value for Field2"},...} )

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Dec 15 2023 01:43:54 GMT-0600 (CST)