mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3806] Updated Search Service docs (#4044)
This commit is contained in:
committed by
Eugenio Romano
parent
5d17878129
commit
81c84074ec
@@ -2,6 +2,7 @@
|
||||
Title: Search service
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-12-03
|
||||
---
|
||||
|
||||
# [Search service](../../lib/core/services/search.service.ts "Defined in search.service.ts")
|
||||
@@ -13,25 +14,31 @@ Accesses the Content Services Search API.
|
||||
### Methods
|
||||
|
||||
- **getNodeQueryResults**(term: `string`, options?: [`SearchOptions`](../../lib/core/services/search.service.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
|
||||
|
||||
- _term:_ `string` -
|
||||
- _options:_ [`SearchOptions`](../../lib/core/services/search.service.ts) - (Optional) (Optional)
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` -
|
||||
|
||||
Gets a list of nodes that match the given search criteria.
|
||||
- _term:_ `string` - Term to search for
|
||||
- _options:_ [`SearchOptions`](../../lib/core/services/search.service.ts) - (Optional) Options for delivery of the search results
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of nodes resulting from the search
|
||||
- **search**(searchTerm: `string`, maxResults: `number`, skipCount: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
|
||||
|
||||
- _searchTerm:_ `string` -
|
||||
- _maxResults:_ `number` -
|
||||
- _skipCount:_ `number` -
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` -
|
||||
|
||||
Performs a search.
|
||||
- _searchTerm:_ `string` - Term to search for
|
||||
- _maxResults:_ `number` - Maximum number of items in the list of results
|
||||
- _skipCount:_ `number` - Number of higher-ranked items to skip over in the list
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of search results
|
||||
- **searchByQueryBody**(queryBody: `QueryBody`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
|
||||
|
||||
- _queryBody:_ `QueryBody` -
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` -
|
||||
Performs a search with its parameters supplied by a QueryBody object.
|
||||
- _queryBody:_ `QueryBody` - Object containing the search parameters
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of search results
|
||||
|
||||
## Details
|
||||
|
||||
See the
|
||||
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-search-rest-api/docs/SearchApi.md#search)
|
||||
for the format of the query and returned data.
|
||||
[search method](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-search-rest-api/docs/SearchApi.md#search)
|
||||
in the Alfresco JS-API for the format of the query and returned data.
|
||||
The [Search Configuration service](../core/search-configuration.service.md)
|
||||
has a method to generate the QueryBody object used by `searchByQueryBody`. The properties of the
|
||||
SearchOptions
|
||||
interface are documented in source file comments.
|
||||
|
||||
## See also
|
||||
|
||||
- [Search Configuration service](../core/search-configuration.service.md)
|
||||
|
Reference in New Issue
Block a user