Constructor
new Search(opts)
Creates a Search
Parameters:
Name | Type | Description |
---|---|---|
opts |
object | The configuration options. |
Methods
deleteSearch(qpId) → {Promise.<any>|Promise.<*>}
Delete search
Parameters:
Name | Type | Description |
---|---|---|
qpId |
The id of the search |
Returns:
- Type
- Promise.<any> | Promise.<*>
deleteSearch(qpId) → {Promise.<any>|Promise.<*>}
Delete search
Parameters:
Name | Type | Description |
---|---|---|
qpId |
The id of the search |
Returns:
- Type
- Promise.<any> | Promise.<*>
findByQueryPaginated(offset, limit, query, propertiesPlugin, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search by query paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
query |
The lucene query |
|
propertiesPlugin |
Plugin className used to return result nodes |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findByQueryPaginated(offset, limit, query, propertiesPlugin, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search by query paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
query |
The lucene query |
|
propertiesPlugin |
Plugin className used to return result nodes |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findPaginated(offset, limit, content, name, domain, keyword, category, properties, author, language, mimeType, title, description, notes, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, folder, folderRecursive, promotedAsRecord, nodeClass, propertiesPlugin, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
content |
The content of a document |
|
name |
The name of a none |
|
domain |
Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
keyword |
List of keywords |
|
category |
List of categories |
|
properties |
List of properties ( property expected format 'key=value' |
|
author |
The author id |
|
language |
The language |
|
mimeType |
The mime-type of a document |
|
title |
The title |
|
description |
The description |
|
notes |
The notes |
|
lastModifiedFrom |
Last modified date from value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
Last modified date to value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The subject email field |
|
mailFrom |
The from email field |
|
mailTo |
The to email field |
|
folder |
The uuid of a folder or record, when empty will be used okm:root by default |
|
folderRecursive |
Boolean value what indicate recursive search |
|
promotedAsRecord |
Boolean value to indicate when node is promoted or not as a record |
|
nodeClass |
The id of a node class ( fileplan should be enabled ) |
|
propertiesPlugin |
Plugin className used to return result nodes |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findPaginated(offset, limit, content, name, domain, keyword, category, properties, author, language, mimeType, title, description, notes, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, folder, folderRecursive, promotedAsRecord, nodeClass, propertiesPlugin, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
content |
The content of a document |
|
name |
The name of a none |
|
domain |
Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
keyword |
List of keywords |
|
category |
List of categories |
|
properties |
List of properties ( property expected format 'key=value' |
|
author |
The author id |
|
language |
The language |
|
mimeType |
The mime-type of a document |
|
title |
The title |
|
description |
The description |
|
notes |
The notes |
|
lastModifiedFrom |
Last modified date from value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
Last modified date to value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The subject email field |
|
mailFrom |
The from email field |
|
mailTo |
The to email field |
|
folder |
The uuid of a folder or record, when empty will be used okm:root by default |
|
folderRecursive |
Boolean value what indicate recursive search |
|
promotedAsRecord |
Boolean value to indicate when node is promoted or not as a record |
|
nodeClass |
The id of a node class ( fileplan should be enabled ) |
|
propertiesPlugin |
Plugin className used to return result nodes |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findSimpleNodeBaseByQueryPaginated(offset, limit, query, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search by query paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
query |
The lucene query |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findSimpleNodeBaseByQueryPaginated(offset, limit, query, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search by query paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
query |
The lucene query |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findSimpleNodeBasePaginated(offset, limit, content, name, domain, keyword, category, properties, author, language, mimeType, title, description, notes, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, folder, folderRecursive, promotedAsRecord, nodeClass, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
content |
The content of a document |
|
name |
The name of a none |
|
domain |
Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
keyword |
List of keywords |
|
category |
List of categories |
|
properties |
List of properties ( property expected format 'key=value' |
|
author |
The author id |
|
language |
The language |
|
mimeType |
The mime-type of a document |
|
title |
The title |
|
description |
The description |
|
notes |
The notes |
|
lastModifiedFrom |
Last modified date from value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
Last modified date to value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The subject email field |
|
mailFrom |
The from email field |
|
mailTo |
The to email field |
|
folder |
The uuid of a folder or record, when empty will be used okm:root by default |
|
folderRecursive |
Boolean value what indicate recursive search |
|
promotedAsRecord |
Boolean value to indicate when node is promoted or not as a record |
|
nodeClass |
The id of a node class ( fileplan should be enabled ) |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
findSimpleNodeBasePaginated(offset, limit, content, name, domain, keyword, category, properties, author, language, mimeType, title, description, notes, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, folder, folderRecursive, promotedAsRecord, nodeClass, sortField, sortReverse) → {Promise.<any>|Promise.<(*|never)>}
Search paginated
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the search |
|
limit |
The maximun number of elements returned |
|
content |
The content of a document |
|
name |
The name of a none |
|
domain |
Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
keyword |
List of keywords |
|
category |
List of categories |
|
properties |
List of properties ( property expected format 'key=value' |
|
author |
The author id |
|
language |
The language |
|
mimeType |
The mime-type of a document |
|
title |
The title |
|
description |
The description |
|
notes |
The notes |
|
lastModifiedFrom |
Last modified date from value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
Last modified date to value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The subject email field |
|
mailFrom |
The from email field |
|
mailTo |
The to email field |
|
folder |
The uuid of a folder or record, when empty will be used okm:root by default |
|
folderRecursive |
Boolean value what indicate recursive search |
|
promotedAsRecord |
Boolean value to indicate when node is promoted or not as a record |
|
nodeClass |
The id of a node class ( fileplan should be enabled ) |
|
sortField |
The field used to sort the results |
|
sortReverse |
When sortReverse and sortField the sort results will be reserved |
Returns:
- Type
- Promise.<any> | Promise.<(*|never)>
getAllSearches() → {Promise.<*>}
Get all the user saved searches
Returns:
List of user saved searches
- Type
- Promise.<*>
getAllSearches() → {Promise.<*>}
Get all the user saved searches
Returns:
List of user saved searches
- Type
- Promise.<*>
getMimeTypes() → {Promise.<*>}
Get all mimetypes
Returns:
List mimetypes
- Type
- Promise.<*>
getMimeTypes() → {Promise.<*>}
Get all mimetypes
Returns:
List mimetypes
- Type
- Promise.<*>
saveSearch(queryName, query, name, title, description, keywords, categories, content, mimeType, language, author, folder, folderRecursive, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, notes, statementQuery, statementType, dashboard, nodeClass, promotedAsRecord, domain, properties) → {Promise.<any>|Promise.<*>}
Save query
Parameters:
Name | Type | Description |
---|---|---|
queryName |
The name of the query |
|
query |
The query Lucene |
|
name |
The name |
|
title |
The title |
|
description |
The description |
|
keywords |
List of keywords |
|
categories |
List of categories |
|
content |
The content |
|
mimeType |
The mimeType |
|
language |
The language |
|
author |
The author |
|
folder |
The folder |
|
folderRecursive |
Evaluate folder recursively |
|
lastModifiedFrom |
The last modified from date value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
The last modified to date value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The email subject |
|
mailFrom |
The email from |
|
mailTo |
The email to |
|
notes |
The notes text |
|
statementQuery |
The statement query |
|
statementType |
The statement type |
|
dashboard |
When true indicate a user query ( news ) |
|
nodeClass |
The node class |
|
promotedAsRecord |
Node is promoted as record |
|
domain |
domain Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
properties |
Map of properties |
Returns:
- Type
- Promise.<any> | Promise.<*>
saveSearch(queryName, query, name, title, description, keywords, categories, content, mimeType, language, author, folder, folderRecursive, lastModifiedFrom, lastModifiedTo, mailSubject, mailFrom, mailTo, notes, statementQuery, statementType, dashboard, nodeClass, promotedAsRecord, domain, properties) → {Promise.<any>|Promise.<*>}
Save query
Parameters:
Name | Type | Description |
---|---|---|
queryName |
The name of the query |
|
query |
The query Lucene |
|
name |
The name |
|
title |
The title |
|
description |
The description |
|
keywords |
List of keywords |
|
categories |
List of categories |
|
content |
The content |
|
mimeType |
The mimeType |
|
language |
The language |
|
author |
The author |
|
folder |
The folder |
|
folderRecursive |
Evaluate folder recursively |
|
lastModifiedFrom |
The last modified from date value in ISO8601 format yyyyMMddHHmmss |
|
lastModifiedTo |
The last modified to date value in ISO8601 format yyyyMMddHHmmss |
|
mailSubject |
The email subject |
|
mailFrom |
The email from |
|
mailTo |
The email to |
|
notes |
The notes text |
|
statementQuery |
The statement query |
|
statementType |
The statement type |
|
dashboard |
When true indicate a user query ( news ) |
|
nodeClass |
The node class |
|
promotedAsRecord |
Node is promoted as record |
|
domain |
domain Values might be 1,2,4,8 -> ( document, folder, email, record ) |
|
properties |
Map of properties |
Returns:
- Type
- Promise.<any> | Promise.<*>
setRestUrl(restUrl)
Set the rest url
Parameters:
Name | Type | Description |
---|---|---|
restUrl |
The rest url |
setRestUrl(restUrl)
Set the rest url
Parameters:
Name | Type | Description |
---|---|---|
restUrl |
The rest url |
setToken(token)
Set the token in Node variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |
setToken(token)
Set the token in Node variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |
updateSearch(queryParams) → {Promise.<any>|Promise.<*>}
Update saved search
Parameters:
Name | Type | Description |
---|---|---|
queryParams |
The |
Returns:
- Type
- Promise.<any> | Promise.<*>
updateSearch(queryParams) → {Promise.<any>|Promise.<*>}
Update saved search
Parameters:
Name | Type | Description |
---|---|---|
queryParams |
The |
Returns:
- Type
- Promise.<any> | Promise.<*>