mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[PRODENG-211] integrate JS-API with monorepo (part 1) (#9081)
* integrate JS-API with monorepo * [ci:force] fix token issue [ci:force] migrate docs folder [ci:force] clean personal tokens * [ci:force] gha workflow support * [ci:force] npm publish target * fix js-api test linting * [ci:force] fix test linting, mocks, https scheme * [ci:force] fix https scheme * [ci:force] typescript mappings * [ci:force] update scripts * lint fixes * linting fixes * fix linting * [ci:force] linting fixes * linting fixes * [ci:force] remove js-api upstream and corresponding scripts * [ci:force] jsdoc fixes * fix jsdoc linting * [ci:force] jsdoc fixes * [ci:force] jsdoc fixes * jsdoc fixes * jsdoc fixes * jsdoc fixes * [ci:force] fix jsdoc * [ci:force] reduce code duplication * replace 'chai' expect with node.js assert * replace 'chai' expect with node.js assert * [ci:force] remove chai and chai-spies for js-api testing * [ci:force] cleanup and fix imports * [ci:force] fix linting * [ci:force] fix unit test * [ci:force] fix sonar linting findings * [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle) * [ci:force] switch activiti api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch search api models to interfaces * [ci:force] switch content api models to interfaces where applicable
This commit is contained in:
72
lib/js-api/src/api/search-rest-api/README.md
Normal file
72
lib/js-api/src/api/search-rest-api/README.md
Normal file
@@ -0,0 +1,72 @@
|
||||
**Search API**
|
||||
|
||||
Provides access to the search features of Alfresco Content Services.
|
||||
|
||||
|
||||
- Last Build date: 2018-11-05T11:25:22.205Z
|
||||
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *https://localhost/alfresco/api/-default-/public/search/versions/1*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*.SearchApi* | [**search**](docs/SearchApi.md#search) | **POST** /search | Searches Alfresco
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [ContentInfo](docs/ContentInfo.md)
|
||||
- [ErrorError](docs/ErrorError.md)
|
||||
- [GenericBucket](docs/GenericBucket.md)
|
||||
- [GenericBucketBucketInfo](docs/GenericBucketBucketInfo.md)
|
||||
- [GenericFacetResponse](docs/GenericFacetResponse.md)
|
||||
- [GenericMetric](docs/GenericMetric.md)
|
||||
- [ModelError](docs/ModelError.md)
|
||||
- [Node](docs/Node.md)
|
||||
- [Pagination](docs/Pagination.md)
|
||||
- [PathElement](docs/PathElement.md)
|
||||
- [PathInfo](docs/PathInfo.md)
|
||||
- [RequestDefaults](docs/RequestDefaults.md)
|
||||
- [RequestFacetField](docs/RequestFacetField.md)
|
||||
- [RequestFacetFields](docs/RequestFacetFields.md)
|
||||
- [RequestFacetIntervals](docs/RequestFacetIntervals.md)
|
||||
- [RequestFacetIntervalsIntervals](docs/RequestFacetIntervalsIntervals.md)
|
||||
- [RequestFacetQueries](docs/RequestFacetQueries.md)
|
||||
- [RequestFacetQueriesInner](docs/RequestFacetQueriesInner.md)
|
||||
- [RequestFacetSet](docs/RequestFacetSet.md)
|
||||
- [RequestFields](docs/RequestFields.md)
|
||||
- [RequestFilterQueries](docs/RequestFilterQueries.md)
|
||||
- [RequestFilterQueriesInner](docs/RequestFilterQueriesInner.md)
|
||||
- [RequestHighlight](docs/RequestHighlight.md)
|
||||
- [RequestHighlightFields](docs/RequestHighlightFields.md)
|
||||
- [RequestInclude](docs/RequestInclude.md)
|
||||
- [RequestLimits](docs/RequestLimits.md)
|
||||
- [RequestLocalization](docs/RequestLocalization.md)
|
||||
- [RequestPagination](docs/RequestPagination.md)
|
||||
- [RequestPivot](docs/RequestPivot.md)
|
||||
- [RequestQuery](docs/RequestQuery.md)
|
||||
- [RequestRange](docs/RequestRange.md)
|
||||
- [RequestScope](docs/RequestScope.md)
|
||||
- [RequestSortDefinition](docs/RequestSortDefinition.md)
|
||||
- [RequestSortDefinitionInner](docs/RequestSortDefinitionInner.md)
|
||||
- [RequestSpellcheck](docs/RequestSpellcheck.md)
|
||||
- [RequestStats](docs/RequestStats.md)
|
||||
- [RequestTemplates](docs/RequestTemplates.md)
|
||||
- [RequestTemplatesInner](docs/RequestTemplatesInner.md)
|
||||
- [ResponseConsistency](docs/ResponseConsistency.md)
|
||||
- [ResultBuckets](docs/ResultBuckets.md)
|
||||
- [ResultBucketsBuckets](docs/ResultBucketsBuckets.md)
|
||||
- [ResultSetContext](docs/ResultSetContext.md)
|
||||
- [ResultSetContextFacetQueries](docs/ResultSetContextFacetQueries.md)
|
||||
- [ResultSetContextSpellcheck](docs/ResultSetContextSpellcheck.md)
|
||||
- [ResultSetPaging](docs/ResultSetPaging.md)
|
||||
- [ResultSetPagingList](docs/ResultSetPagingList.md)
|
||||
- [ResultSetRowEntry](docs/ResultSetRowEntry.md)
|
||||
- [SearchEntry](docs/SearchEntry.md)
|
||||
- [SearchEntryHighlight](docs/SearchEntryHighlight.md)
|
||||
- [SearchRequest](docs/SearchRequest.md)
|
||||
- [UserInfo](docs/UserInfo.md)
|
||||
- [ResultNode](docs/ResultNode.md)
|
||||
|
18
lib/js-api/src/api/search-rest-api/api/index.ts
Normal file
18
lib/js-api/src/api/search-rest-api/api/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './search.api';
|
51
lib/js-api/src/api/search-rest-api/api/search.api.ts
Normal file
51
lib/js-api/src/api/search-rest-api/api/search.api.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ResultSetPaging } from '../model/resultSetPaging';
|
||||
import { SearchRequest } from '../model/searchRequest';
|
||||
import { throwIfNotDefined } from '../../../assert';
|
||||
import { ApiClient } from '../../../api-clients/api-client';
|
||||
import { LegacyHttpClient } from '../../../api-clients/http-client.interface';
|
||||
|
||||
/**
|
||||
* Search service.
|
||||
*
|
||||
* @module SearchApi
|
||||
*/
|
||||
export class SearchApi extends ApiClient {
|
||||
override get apiClient(): LegacyHttpClient {
|
||||
return this.httpClient ?? this.alfrescoApi.searchClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches Alfresco
|
||||
*
|
||||
* **Note**: this endpoint is available in Alfresco 5.2 and newer versions.
|
||||
*
|
||||
* @param queryBody Generic query API
|
||||
* @returns Promise<ResultSetPaging>
|
||||
*/
|
||||
search(queryBody: SearchRequest): Promise<ResultSetPaging> {
|
||||
throwIfNotDefined(queryBody, 'queryBody');
|
||||
|
||||
return this.post({
|
||||
path: '/search',
|
||||
bodyParam: queryBody,
|
||||
returnType: ResultSetPaging
|
||||
});
|
||||
}
|
||||
}
|
12
lib/js-api/src/api/search-rest-api/docs/ContentInfo.md
Normal file
12
lib/js-api/src/api/search-rest-api/docs/ContentInfo.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# ContentInfo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mimeType** | **string** | | [default to null]
|
||||
**mimeTypeName** | **string** | | [default to null]
|
||||
**sizeInBytes** | **number** | | [default to null]
|
||||
**encoding** | **string** | | [optional] [default to null]
|
||||
**mimeTypeGroup** | **string** | | [optional] [default to null]
|
||||
|
||||
|
8
lib/js-api/src/api/search-rest-api/docs/Error.md
Normal file
8
lib/js-api/src/api/search-rest-api/docs/Error.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# ModelError
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**error** | [**ErrorError**](ErrorError.md) | | [optional] [default to null]
|
||||
|
||||
|
13
lib/js-api/src/api/search-rest-api/docs/Error_error.md
Normal file
13
lib/js-api/src/api/search-rest-api/docs/Error_error.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# ErrorError
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**errorKey** | **string** | | [optional] [default to null]
|
||||
**statusCode** | **number** | | [default to null]
|
||||
**briefSummary** | **string** | | [default to null]
|
||||
**stackTrace** | **string** | | [default to null]
|
||||
**descriptionURL** | **string** | | [default to null]
|
||||
**logId** | **string** | | [optional] [default to null]
|
||||
|
||||
|
13
lib/js-api/src/api/search-rest-api/docs/GenericBucket.md
Normal file
13
lib/js-api/src/api/search-rest-api/docs/GenericBucket.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# GenericBucket
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **string** | The bucket label | [optional] [default to null]
|
||||
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
|
||||
**display** | **any** | An optional field for additional display information | [optional] [default to null]
|
||||
**metrics** | [**GenericMetric[]**](GenericMetric.md) | An array of buckets and values | [optional] [default to null]
|
||||
**facets** | **any[]** | Additional list of nested facets | [optional] [default to null]
|
||||
**bucketInfo** | [**GenericBucketBucketInfo**](GenericBucketBucketInfo.md) | | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,11 @@
|
||||
# GenericBucketBucketInfo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**start** | **string** | The start of range | [optional] [default to null]
|
||||
**startInclusive** | **boolean** | Includes values greater or equal to \"start\" | [optional] [default to null]
|
||||
**end** | **string** | The end of range | [optional] [default to null]
|
||||
**endInclusive** | **boolean** | Includes values less than or equal to \"end\" | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,10 @@
|
||||
# GenericFacetResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **string** | The facet type, eg. interval, range, pivot, stats | [optional] [default to null]
|
||||
**label** | **string** | The field name or its explicit label, if provided on the request | [optional] [default to null]
|
||||
**buckets** | [**GenericBucket[]**](GenericBucket.md) | An array of buckets and values | [optional] [default to null]
|
||||
|
||||
|
10
lib/js-api/src/api/search-rest-api/docs/GenericMetric.md
Normal file
10
lib/js-api/src/api/search-rest-api/docs/GenericMetric.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GenericMetric
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **string** | The type of metric, e.g. count | [optional] [default to null]
|
||||
**value** | **any** | The metric value, e.g. {\"count\": 34}
|
||||
| [optional] [default to null]
|
||||
|
||||
|
26
lib/js-api/src/api/search-rest-api/docs/Node.md
Normal file
26
lib/js-api/src/api/search-rest-api/docs/Node.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Node
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [default to null]
|
||||
**name** | **string** | The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |.
|
||||
The character . must not be used at the end of the name.
|
||||
| [default to null]
|
||||
**nodeType** | **string** | | [default to null]
|
||||
**isFolder** | **boolean** | | [default to null]
|
||||
**isFile** | **boolean** | | [default to null]
|
||||
**isLocked** | **boolean** | | [optional] [default to null]
|
||||
**modifiedAt** | [**Date**](Date.md) | | [default to null]
|
||||
**modifiedByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
|
||||
**createdAt** | [**Date**](Date.md) | | [default to null]
|
||||
**createdByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
|
||||
**parentId** | **string** | | [optional] [default to null]
|
||||
**isLink** | **boolean** | | [optional] [default to null]
|
||||
**content** | [**ContentInfo**](ContentInfo.md) | | [optional] [default to null]
|
||||
**aspectNames** | **string[]** | | [optional] [default to null]
|
||||
**properties** | **any** | | [optional] [default to null]
|
||||
**allowableOperations** | **string[]** | | [optional] [default to null]
|
||||
**path** | [**PathInfo**](PathInfo.md) | | [optional] [default to null]
|
||||
|
||||
|
23
lib/js-api/src/api/search-rest-api/docs/Pagination.md
Normal file
23
lib/js-api/src/api/search-rest-api/docs/Pagination.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Pagination
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**count** | **number** | The number of objects in the entries array.
|
||||
| [default to null]
|
||||
**hasMoreItems** | **boolean** | A boolean value which is **true** if there are more entities in the collection
|
||||
beyond those in this response. A true value means a request with a larger value
|
||||
for the **skipCount** or the **maxItems** parameter will return more entities.
|
||||
| [default to null]
|
||||
**totalItems** | **number** | An integer describing the total number of entities in the collection.
|
||||
The API might not be able to determine this value,
|
||||
in which case this property will not be present.
|
||||
| [optional] [default to null]
|
||||
**skipCount** | **number** | An integer describing how many entities exist in the collection before
|
||||
those included in this list.
|
||||
| [default to null]
|
||||
**maxItems** | **number** | The value of the **maxItems** parameter used to generate this list,
|
||||
or if there was no **maxItems** parameter the default value is 100
|
||||
| [default to null]
|
||||
|
||||
|
9
lib/js-api/src/api/search-rest-api/docs/PathElement.md
Normal file
9
lib/js-api/src/api/search-rest-api/docs/PathElement.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# PathElement
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [optional] [default to null]
|
||||
**name** | **string** | | [optional] [default to null]
|
||||
|
||||
|
10
lib/js-api/src/api/search-rest-api/docs/PathInfo.md
Normal file
10
lib/js-api/src/api/search-rest-api/docs/PathInfo.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# PathInfo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**elements** | [**PathElement[]**](PathElement.md) | | [optional] [default to null]
|
||||
**name** | **string** | | [optional] [default to null]
|
||||
**isComplete** | **boolean** | | [optional] [default to null]
|
||||
|
||||
|
43
lib/js-api/src/api/search-rest-api/docs/RequestDefaults.md
Normal file
43
lib/js-api/src/api/search-rest-api/docs/RequestDefaults.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# RequestDefaults
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**textAttributes** | **string[]** | A list of query fields/properties used to expand TEXT: queries.
|
||||
The default is cm:content.
|
||||
You could include all content properties using d:content or list all individual content properties or types.
|
||||
As more terms are included the query size, complexity, memory impact and query time will increase.
|
||||
| [optional] [default to null]
|
||||
**defaultFTSOperator** | **string** | The default way to combine query parts when AND or OR is not explicitly stated - includes ! - +
|
||||
one two three
|
||||
(one two three)
|
||||
| [optional] [default to null]
|
||||
**defaultFTSFieldOperator** | **string** | The default way to combine query parts in field query groups when AND or OR is not explicitly stated - includes ! - +
|
||||
FIELD:(one two three)
|
||||
| [optional] [default to null]
|
||||
**namespace** | **string** | The default name space to use if one is not provided | [optional] [default to null]
|
||||
**defaultFieldName** | **string** | | [optional] [default to null]
|
||||
|
||||
|
||||
<a name="RequestDefaults.DefaultFTSOperatorEnum"></a>
|
||||
## Enum: RequestDefaults.DefaultFTSOperatorEnum
|
||||
|
||||
|
||||
* `AND` (value: `'AND'`)
|
||||
|
||||
* `OR` (value: `'OR'`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="RequestDefaults.DefaultFTSFieldOperatorEnum"></a>
|
||||
## Enum: RequestDefaults.DefaultFTSFieldOperatorEnum
|
||||
|
||||
|
||||
* `AND` (value: `'AND'`)
|
||||
|
||||
* `OR` (value: `'OR'`)
|
||||
|
||||
|
||||
|
||||
|
42
lib/js-api/src/api/search-rest-api/docs/RequestFacetField.md
Normal file
42
lib/js-api/src/api/search-rest-api/docs/RequestFacetField.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# RequestFacetField
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The facet field | [optional] [default to null]
|
||||
**label** | **string** | A label to include in place of the facet field | [optional] [default to null]
|
||||
**prefix** | **string** | Restricts the possible constraints to only indexed values with a specified prefix. | [optional] [default to null]
|
||||
**sort** | **string** | | [optional] [default to null]
|
||||
**method** | **string** | | [optional] [default to null]
|
||||
**missing** | **boolean** | When true, count results that match the query but which have no facet value for the field (in addition to the Term-based constraints). | [optional] [default to null]
|
||||
**limit** | **number** | | [optional] [default to null]
|
||||
**offset** | **number** | | [optional] [default to null]
|
||||
**mincount** | **number** | The minimum count required for a facet field to be included in the response. | [optional] [default to null]
|
||||
**facetEnumCacheMinDf** | **number** | | [optional] [default to null]
|
||||
**excludeFilters** | **string[]** | Filter Queries with tags listed here will not be included in facet counts.
|
||||
This is used for multi-select facetting.
|
||||
| [optional] [default to null]
|
||||
|
||||
|
||||
<a name="RequestFacetField.SortEnum"></a>
|
||||
## Enum: RequestFacetField.SortEnum
|
||||
|
||||
|
||||
* `COUNT` (value: `'COUNT'`)
|
||||
|
||||
* `INDEX` (value: `'INDEX'`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="RequestFacetField.MethodEnum"></a>
|
||||
## Enum: RequestFacetField.MethodEnum
|
||||
|
||||
|
||||
* `ENUM` (value: `'ENUM'`)
|
||||
|
||||
* `FC` (value: `'FC'`)
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestFacetFields
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**facets** | [**RequestFacetField[]**](RequestFacetField.md) | Define specific fields on which to facet (adds SOLR facet.field and f.<field>.facet.* options)
|
||||
| [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestFacetIntervals
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sets** | [**RequestFacetSet[]**](RequestFacetSet.md) | Sets the intervals for all fields. | [optional] [default to null]
|
||||
**intervals** | [**RequestFacetIntervalsIntervals[]**](RequestFacetIntervalsIntervals.md) | Specifies the fields to facet by interval. | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,10 @@
|
||||
# RequestFacetIntervalsIntervals
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The field to facet on | [optional] [default to null]
|
||||
**label** | **string** | A label to use to identify the field facet | [optional] [default to null]
|
||||
**sets** | [**RequestFacetSet[]**](RequestFacetSet.md) | Sets the intervals for all fields. | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
# RequestFacetQueries
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestFacetQueriesInner
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**query** | **string** | A facet query | [optional] [default to null]
|
||||
**label** | **string** | A label to include in place of the facet query | [optional] [default to null]
|
||||
|
||||
|
12
lib/js-api/src/api/search-rest-api/docs/RequestFacetSet.md
Normal file
12
lib/js-api/src/api/search-rest-api/docs/RequestFacetSet.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# RequestFacetSet
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **string** | A label to use to identify the set | [optional] [default to null]
|
||||
**start** | **string** | The start of the range | [optional] [default to null]
|
||||
**end** | **string** | The end of the range | [optional] [default to null]
|
||||
**startInclusive** | **boolean** | When true, the set will include values greater or equal to \"start\" | [optional] [default to null]
|
||||
**endInclusive** | **boolean** | When true, the set will include values less than or equal to \"end\" | [optional] [default to null]
|
||||
|
||||
|
7
lib/js-api/src/api/search-rest-api/docs/RequestFields.md
Normal file
7
lib/js-api/src/api/search-rest-api/docs/RequestFields.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# RequestFields
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
# RequestFilterQueries
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@@ -0,0 +1,11 @@
|
||||
# RequestFilterQueriesInner
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**query** | **string** | The filter query expression.
|
||||
For multi-select facets selected facets must be order together
|
||||
| [optional] [default to null]
|
||||
**tags** | **string[]** | Tags used exclude the filters from facet evaluation for multi-select facet support | [optional] [default to null]
|
||||
|
||||
|
15
lib/js-api/src/api/search-rest-api/docs/RequestHighlight.md
Normal file
15
lib/js-api/src/api/search-rest-api/docs/RequestHighlight.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RequestHighlight
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**prefix** | **string** | The string used to mark the start of a highlight in a fragment. | [optional] [default to null]
|
||||
**postfix** | **string** | The string used to mark the end of a highlight in a fragment. | [optional] [default to null]
|
||||
**snippetCount** | **number** | The maximum number of distinct highlight snippets to return for each highlight field. | [optional] [default to null]
|
||||
**fragmentSize** | **number** | The character length of each snippet. | [optional] [default to null]
|
||||
**maxAnalyzedChars** | **number** | The number of characters to be considered for highlighting. Matches after this count will not be shown. | [optional] [default to null]
|
||||
**mergeContiguous** | **boolean** | If fragments over lap they can be merged into one larger fragment | [optional] [default to null]
|
||||
**usePhraseHighlighter** | **boolean** | Should phrases be identified. | [optional] [default to null]
|
||||
**fields** | [**RequestHighlightFields[]**](RequestHighlightFields.md) | The fields to highlight and field specific configuration properties for each field | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,13 @@
|
||||
# RequestHighlightFields
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The name of the field to highlight. | [optional] [default to null]
|
||||
**snippetCount** | **number** | | [optional] [default to null]
|
||||
**fragmentSize** | **number** | | [optional] [default to null]
|
||||
**mergeContiguous** | **boolean** | | [optional] [default to null]
|
||||
**prefix** | **string** | | [optional] [default to null]
|
||||
**postfix** | **string** | | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
# RequestInclude
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
9
lib/js-api/src/api/search-rest-api/docs/RequestLimits.md
Normal file
9
lib/js-api/src/api/search-rest-api/docs/RequestLimits.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# RequestLimits
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**permissionEvaluationTime** | **number** | Maximum time for post query permission evaluation | [optional] [default to null]
|
||||
**permissionEvaluationCount** | **number** | Maximum count of post query permission evaluations | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestLocalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timezone** | **string** | A valid timezone id supported by @see java.time.ZoneId | [optional] [default to null]
|
||||
**locales** | **string[]** | A list of Locales defined by IETF BCP 47. The ordering is significant. The first locale (leftmost) is used for sort and query localization, whereas the remaining locales are used for query only. | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestPagination
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**maxItems** | **number** | The maximum number of items to return in the query results | [optional] [default to null]
|
||||
**skipCount** | **number** | The number of items to skip from the start of the query set | [optional] [default to null]
|
||||
|
||||
|
9
lib/js-api/src/api/search-rest-api/docs/RequestPivot.md
Normal file
9
lib/js-api/src/api/search-rest-api/docs/RequestPivot.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# RequestPivot
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**key** | **string** | A key corresponding to a matching field facet label or stats. | [optional] [default to null]
|
||||
**pivots** | [**RequestPivot[]**](RequestPivot.md) | | [optional] [default to null]
|
||||
|
||||
|
23
lib/js-api/src/api/search-rest-api/docs/RequestQuery.md
Normal file
23
lib/js-api/src/api/search-rest-api/docs/RequestQuery.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# RequestQuery
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**language** | **string** | The query language in which the query is written. | [optional] [default to null]
|
||||
**userQuery** | **string** | The exact search request typed in by the user | [optional] [default to null]
|
||||
**query** | **string** | The query which may have been generated in some way from the userQuery | [default to null]
|
||||
|
||||
|
||||
<a name="RequestQuery.LanguageEnum"></a>
|
||||
## Enum: RequestQuery.LanguageEnum
|
||||
|
||||
|
||||
* `Afts` (value: `'afts'`)
|
||||
|
||||
* `Lucene` (value: `'lucene'`)
|
||||
|
||||
* `Cmis` (value: `'cmis'`)
|
||||
|
||||
|
||||
|
||||
|
16
lib/js-api/src/api/search-rest-api/docs/RequestRange.md
Normal file
16
lib/js-api/src/api/search-rest-api/docs/RequestRange.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# RequestRange
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The name of the field to perform range | [optional] [default to null]
|
||||
**start** | **string** | The start of the range | [optional] [default to null]
|
||||
**end** | **string** | The end of the range | [optional] [default to null]
|
||||
**gap** | **string** | Bucket size | [optional] [default to null]
|
||||
**hardend** | **boolean** | If true means that the last bucket will end at “end” even if it is less than “gap” wide. | [optional] [default to null]
|
||||
**other** | **string[]** | before, after, between, non, all | [optional] [default to null]
|
||||
**include** | **string[]** | lower, upper, edge, outer, all | [optional] [default to null]
|
||||
**label** | **string** | A label to include as a pivot reference | [optional] [default to null]
|
||||
**excludeFilters** | **string[]** | Filter queries to exclude when calculating statistics | [optional] [default to null]
|
||||
|
||||
|
22
lib/js-api/src/api/search-rest-api/docs/RequestScope.md
Normal file
22
lib/js-api/src/api/search-rest-api/docs/RequestScope.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# RequestScope
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**locations** | **string** | The locations to include in the query
|
||||
| [optional] [default to null]
|
||||
|
||||
|
||||
<a name="RequestScope.LocationsEnum"></a>
|
||||
## Enum: RequestScope.LocationsEnum
|
||||
|
||||
|
||||
* `Nodes` (value: `'nodes'`)
|
||||
|
||||
* `Versions` (value: `'versions'`)
|
||||
|
||||
* `DeletedNodes` (value: `'deleted-nodes'`)
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
# RequestSortDefinition
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@@ -0,0 +1,23 @@
|
||||
# RequestSortDefinitionInner
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **string** | How to order - using a field, when position of the document in the index, score/relevance. | [optional] [default to null]
|
||||
**field** | **string** | The name of the field | [optional] [default to null]
|
||||
**ascending** | **boolean** | The sort order. (The ordering of nulls is determined by the SOLR configuration) | [optional] [default to null]
|
||||
|
||||
|
||||
<a name="RequestSortDefinitionInner.TypeEnum"></a>
|
||||
## Enum: RequestSortDefinitionInner.TypeEnum
|
||||
|
||||
|
||||
* `FIELD` (value: `'FIELD'`)
|
||||
|
||||
* `DOCUMENT` (value: `'DOCUMENT'`)
|
||||
|
||||
* `SCORE` (value: `'SCORE'`)
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# RequestSpellcheck
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**query** | **string** | | [optional] [default to null]
|
||||
|
||||
|
23
lib/js-api/src/api/search-rest-api/docs/RequestStats.md
Normal file
23
lib/js-api/src/api/search-rest-api/docs/RequestStats.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# RequestStats
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The stats field | [optional] [default to null]
|
||||
**label** | **string** | A label to include for reference the stats field | [optional] [default to null]
|
||||
**min** | **boolean** | The minimum value of the field | [optional] [default to null]
|
||||
**max** | **boolean** | The maximum value of the field | [optional] [default to null]
|
||||
**sum** | **boolean** | The sum of all values of the field | [optional] [default to null]
|
||||
**countValues** | **boolean** | The number which have a value for this field | [optional] [default to null]
|
||||
**missing** | **boolean** | The number which do not have a value for this field | [optional] [default to null]
|
||||
**mean** | **boolean** | The average | [optional] [default to null]
|
||||
**stddev** | **boolean** | Standard deviation | [optional] [default to null]
|
||||
**sumOfSquares** | **boolean** | Sum of all values squared | [optional] [default to null]
|
||||
**distinctValues** | **boolean** | The set of all distinct values for the field (This can be very expensive to calculate) | [optional] [default to null]
|
||||
**countDistinct** | **boolean** | The number of distinct values (This can be very expensive to calculate) | [optional] [default to null]
|
||||
**cardinality** | **boolean** | A statistical approximation of the number of distinct values | [optional] [default to null]
|
||||
**cardinalityAccuracy** | **number** | Number between 0.0 and 1.0 indicating how aggressively the algorithm should try to be accurate. Used with boolean cardinality flag. | [optional] [default to 0.3]
|
||||
**excludeFilters** | **string[]** | A list of filters to exclude | [optional] [default to null]
|
||||
**percentiles** | **number[]** | A list of percentile values, e.g. \"1,99,99.9\" | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
# RequestTemplates
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RequestTemplatesInner
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | The template name | [optional] [default to null]
|
||||
**template** | **string** | The template | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# ResponseConsistency
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**lastTxId** | **number** | The id of the last indexed transaction | [optional] [default to null]
|
||||
|
||||
|
9
lib/js-api/src/api/search-rest-api/docs/ResultBuckets.md
Normal file
9
lib/js-api/src/api/search-rest-api/docs/ResultBuckets.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ResultBuckets
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **string** | The field name or its explicit label, if provided on the request | [optional] [default to null]
|
||||
**buckets** | [**ResultBucketsBuckets[]**](ResultBucketsBuckets.md) | An array of buckets and values | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,11 @@
|
||||
# ResultBucketsBuckets
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **string** | The bucket label | [optional] [default to null]
|
||||
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
|
||||
**count** | **number** | The count for the bucket | [optional] [default to null]
|
||||
**display** | **any** | An optional field for additional display information | [optional] [default to null]
|
||||
|
||||
|
31
lib/js-api/src/api/search-rest-api/docs/ResultNode.md
Normal file
31
lib/js-api/src/api/search-rest-api/docs/ResultNode.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# ResultNode
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [default to null]
|
||||
**name** | **string** | The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |.
|
||||
The character . must not be used at the end of the name.
|
||||
| [default to null]
|
||||
**nodeType** | **string** | | [default to null]
|
||||
**isFolder** | **boolean** | | [default to null]
|
||||
**isFile** | **boolean** | | [default to null]
|
||||
**isLocked** | **boolean** | | [optional] [default to null]
|
||||
**modifiedAt** | [**Date**](Date.md) | | [default to null]
|
||||
**modifiedByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
|
||||
**createdAt** | [**Date**](Date.md) | | [default to null]
|
||||
**createdByUser** | [**UserInfo**](UserInfo.md) | | [default to null]
|
||||
**parentId** | **string** | | [optional] [default to null]
|
||||
**isLink** | **boolean** | | [optional] [default to null]
|
||||
**content** | [**ContentInfo**](ContentInfo.md) | | [optional] [default to null]
|
||||
**aspectNames** | **string[]** | | [optional] [default to null]
|
||||
**properties** | **any** | | [optional] [default to null]
|
||||
**allowableOperations** | **string[]** | | [optional] [default to null]
|
||||
**path** | [**PathInfo**](PathInfo.md) | | [optional] [default to null]
|
||||
**search** | [**SearchEntry**](SearchEntry.md) | | [optional] [default to null]
|
||||
**archivedByUser** | [**UserInfo**](UserInfo.md) | | [optional] [default to null]
|
||||
**archivedAt** | [**Date**](Date.md) | | [optional] [default to null]
|
||||
**versionLabel** | **string** | | [optional] [default to null]
|
||||
**versionComment** | **string** | | [optional] [default to null]
|
||||
|
||||
|
18
lib/js-api/src/api/search-rest-api/docs/ResultSetContext.md
Normal file
18
lib/js-api/src/api/search-rest-api/docs/ResultSetContext.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# ResultSetContext
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**consistency** | [**ResponseConsistency**](ResponseConsistency.md) | | [optional] [default to null]
|
||||
**request** | [**SearchRequest**](SearchRequest.md) | | [optional] [default to null]
|
||||
**facetQueries** | [**ResultSetContextFacetQueries[]**](ResultSetContextFacetQueries.md) | The counts from facet queries | [optional] [default to null]
|
||||
**facetsFields** | [**ResultBuckets[]**](ResultBuckets.md) | The counts from field facets | [optional] [default to null]
|
||||
**facets** | [**GenericFacetResponse[]**](GenericFacetResponse.md) | The faceted response | [optional] [default to null]
|
||||
**spellcheck** | [**ResultSetContextSpellcheck[]**](ResultSetContextSpellcheck.md) | Suggested corrections
|
||||
|
||||
If zero results were found for the original query then a single entry of type \"searchInsteadFor\" will be returned.
|
||||
If alternatives were found that return more results than the original query they are returned as \"didYouMean\" options.
|
||||
The highest quality suggestion is first.
|
||||
| [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,10 @@
|
||||
# ResultSetContextFacetQueries
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | **string** | | [optional] [default to null]
|
||||
**filterQuery** | **string** | The filter query you can use to apply this facet | [optional] [default to null]
|
||||
**count** | **number** | | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,20 @@
|
||||
# ResultSetContextSpellcheck
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **string** | | [optional] [default to null]
|
||||
**suggestion** | **string[]** | A suggested alternative query | [optional] [default to null]
|
||||
|
||||
|
||||
<a name="ResultSetContextSpellcheck.TypeEnum"></a>
|
||||
## Enum: ResultSetContextSpellcheck.TypeEnum
|
||||
|
||||
|
||||
* `SearchInsteadFor` (value: `'searchInsteadFor'`)
|
||||
|
||||
* `DidYouMean` (value: `'didYouMean'`)
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# ResultSetPaging
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**list** | [**ResultSetPagingList**](ResultSetPagingList.md) | | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,10 @@
|
||||
# ResultSetPagingList
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**pagination** | [**Pagination**](Pagination.md) | | [optional] [default to null]
|
||||
**context** | [**ResultSetContext**](ResultSetContext.md) | | [optional] [default to null]
|
||||
**entries** | [**ResultSetRowEntry[]**](ResultSetRowEntry.md) | | [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# ResultSetRowEntry
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**entry** | [**ResultNode**](ResultNode.md) | | [default to null]
|
||||
|
||||
|
359
lib/js-api/src/api/search-rest-api/docs/SearchApi.md
Normal file
359
lib/js-api/src/api/search-rest-api/docs/SearchApi.md
Normal file
@@ -0,0 +1,359 @@
|
||||
# SearchApi
|
||||
|
||||
All URIs are relative to *https://localhost/alfresco/api/-default-/public/search/versions/1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**search**](SearchApi.md#search) | **POST** /search | Searches Alfresco
|
||||
|
||||
|
||||
<a name="search"></a>
|
||||
# **search**
|
||||
> ResultSetPaging search(queryBody)
|
||||
|
||||
Searches Alfresco
|
||||
|
||||
**Note**: this endpoint is available in Alfresco 5.2 and newer versions.
|
||||
|
||||
**You specify all the parameters in this API in a JSON body**, URL parameters are not supported.
|
||||
A basic query looks like this:
|
||||
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"foo\"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
**Note:** These are the minimum possible query parameters.
|
||||
|
||||
The default search language is **afts** ([Alfresco Full Text Search](http://docs.alfresco.com/5.1/concepts/rm-searchsyntax-intro.html)), but you can also specify **cmis**, and **lucene**.
|
||||
|
||||
A basic CMIS query looks like this:
|
||||
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"select * from cmis:folder\",
|
||||
\"language\": \"cmis\"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
By default, **results are limited to the first 100.**
|
||||
Results can be restricted using \"paging\". For example:
|
||||
JSON
|
||||
\"paging\": {
|
||||
\"maxItems\": \"50\",
|
||||
\"skipCount\": \"28\"
|
||||
}
|
||||
|
||||
This example would ensure that results are **limited by Final Size**,
|
||||
skipping the first 28 results and returning the next 50.
|
||||
|
||||
Alternatively, you can limit the results by using the **limits JSON body parameter**. For example,
|
||||
JSON
|
||||
\"limits\": {
|
||||
\"permissionEvaluationTime\": 20000,
|
||||
\"permissionEvaluationCount\": 2000
|
||||
}
|
||||
|
||||
|
||||
You can use the **include JSON body parameter** to return additional information.
|
||||
This works in the same way as in the /nodes/{nodeId}/children method in the core API. For example:
|
||||
JSON
|
||||
\"include\": [\"aspectNames\", \"properties\", \"isLink\"]
|
||||
|
||||
|
||||
You can use the **fields JSON body parameter** to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.
|
||||
This works in the same way as in the /nodes/{nodeId}/children method in the core API. For example:
|
||||
JSON
|
||||
\"fields\": [\"id\", \"name\", \"search\"]
|
||||
|
||||
|
||||
You can sort the results using the **sort JSON body parameter**, for example:
|
||||
JSON
|
||||
\"sort\": [{\"type\":\"FIELD\", \"field\":\"cm:description\", \"ascending\":\"true\"}]
|
||||
|
||||
**Note:** the **sort** parameter is not supported for CMIS queries.
|
||||
|
||||
By default, search uses the **\"nodes\" location**, which is the **content store known as workspace://SpacesStore**.
|
||||
To change the scope to another location you can use the **locations JSON body parameter**. You can specify either **nodes** (the default), **versions** or **deleted-nodes**. For example,
|
||||
JSON
|
||||
\"scope\": {
|
||||
\"locations\": [\"deleted-nodes\"]
|
||||
}
|
||||
|
||||
You can specify templates using the **templates JSON body parameter**, for example:
|
||||
JSON
|
||||
\"templates\": [{\"name\": \"_PERSON\",\"template\": \"|%firstName OR |%lastName OR |%userName\"},
|
||||
{\"name\": \"mytemplate\",\"template\": \"%cm:content\"}]
|
||||
|
||||
|
||||
**Note: Spell checking only works on Search Services (Solr 6) if you have already enabled suggestions.**
|
||||
|
||||
For **spell checking** you can use a query like this:
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"cm:title:alfrezco\"
|
||||
},
|
||||
\"spellcheck\": {\"query\": \"alfrezco\"}
|
||||
}
|
||||
|
||||
|
||||
If you are already specifying \"userQuery\" then the following may be easier
|
||||
and produces the same result :
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"cm:title:alfrezco\",
|
||||
\"userQuery\": \"alfrezco\"
|
||||
},
|
||||
\"spellcheck\": {}
|
||||
}
|
||||
|
||||
|
||||
The spellcheck response includes a spellCheck context like this:
|
||||
JSON
|
||||
\"context\": {
|
||||
\"spellCheck\": {
|
||||
\"type\": \"searchInsteadFor\",
|
||||
\"suggestions\": [\"alfresco\"]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
To specify defaults, you use a **defaults JSON body parameter**, for example:
|
||||
JSON
|
||||
\"defaults\": {
|
||||
\"textAttributes\": [
|
||||
\"cm:content\", \"cm:name\"
|
||||
],
|
||||
\"defaultFTSOperator\": \"AND\",
|
||||
\"defaultFTSFieldOperator\": \"OR\",
|
||||
\"namespace\": \"cm\",
|
||||
\"defaultFieldName\": \"PATH\"
|
||||
}
|
||||
|
||||
|
||||
You can specify several filter queries using the **filterQueries JSON body parameter**, for example:
|
||||
JSON
|
||||
\"filterQueries\": [{\"query\": \"TYPE:'cm:folder'\"},{\"query\": \"cm:creator:mjackson\"}]
|
||||
|
||||
|
||||
You can specify several facet queries using the **facetQueries JSON body parameter**, for example:
|
||||
JSON
|
||||
\"facetQueries\": [{\"query\": \"created:2016\",\"label\": \"CreatedThisYear\"}]
|
||||
|
||||
The response will contain a matching \"context\" section, the \"label\" will match the facet query.
|
||||
JSON
|
||||
\"context\": {
|
||||
\"facetQueries\": [
|
||||
{\"label\": \"CreatedThisYear\",\"count\": 3}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
A complete query for facetting via the content.size field looks this:
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"presentation\",
|
||||
\"language\": \"afts\"
|
||||
},
|
||||
\"facetQueries\": [
|
||||
{\"query\": \"content.size:[0 TO 10240]\", \"label\": \"xtra small\"},
|
||||
{\"query\": \"content.size:[10240 TO 102400]\", \"label\": \"small\"},
|
||||
{\"query\": \"content.size:[102400 TO 1048576]\", \"label\": \"medium\"},
|
||||
{\"query\": \"content.size:[1048576 TO 16777216]\", \"label\": \"large\"},
|
||||
{\"query\": \"content.size:[16777216 TO 134217728]\", \"label\": \"xtra large\"},
|
||||
{\"query\": \"content.size:[134217728 TO MAX]\", \"label\": \"XX large\"}
|
||||
],
|
||||
\"facetFields\": {\"facets\": [{\"field\": \"'content.size'\"}]}
|
||||
}
|
||||
|
||||
|
||||
The response will contain a matching \"context\" section, the \"label\" will match the facet query.
|
||||
JSON
|
||||
\"context\": {
|
||||
\"facetQueries\": [
|
||||
{ \"label\": \"small\",\"count\": 2 },
|
||||
{ \"label\": \"large\",\"count\": 0 },
|
||||
{ \"label\": \"xtra small\",\"count\": 5 },
|
||||
{ \"label\": \"xtra large\",\"count\": 56},
|
||||
{ \"label\": \"medium\",\"count\": 4 },
|
||||
{ \"label\": \"XX large\", \"count\": 1 }
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
You can specify several facet fields using the **facetFields JSON body parameter**, for example:
|
||||
JSON
|
||||
\"facetFields\": {\"facets\": [{\"field\": \"creator\", \"mincount\": 1}, {\"field\": \"modifier\", \"mincount\": 1}]}
|
||||
|
||||
The response will contain a matching \"context\" section, the \"label\" will match the facet field.
|
||||
JSON
|
||||
\"context\": {
|
||||
\"facetsFields\": [
|
||||
{ \"label\": \"creator\",
|
||||
\"buckets\": [
|
||||
{ \"label\": \"System\", \"count\": 75 },
|
||||
{ \"label\": \"mjackson\", \"count\": 5 }
|
||||
]},
|
||||
{ \"label\": \"modifier\",
|
||||
\"buckets\": [
|
||||
{ \"label\": \"System\", \"count\": 72 },
|
||||
{ \"label\": \"mjackson\", \"count\": 5 },
|
||||
{ \"label\": \"admin\", \"count\": 3 }
|
||||
]}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
Grouping facet queries that go together can be done by specifying the group label in the fact queries as follow:
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"presentation\"
|
||||
},
|
||||
\"facetQueries\": [
|
||||
{\"query\": \"content.size:[0 TO 102400]\", \"label\": \"small\", \"group\":\"foo\"},
|
||||
{\"query\": \"content.size:[102400 TO 1048576]\", \"label\": \"medium\",\"group\":\"foo\"},
|
||||
{\"query\": \"content.size:[1048576 TO 16777216]\", \"label\": \"large\",\"group\":\"foo\"}
|
||||
]
|
||||
}
|
||||
|
||||
The above query returns the results a faceted field grouped under the label foo:
|
||||
JSON
|
||||
{
|
||||
\"context\": {\"facetsFields\": [{
|
||||
\"label\": \"foo\",
|
||||
\"buckets\": [
|
||||
{
|
||||
\"count\": 109,
|
||||
\"label\": \"small\",
|
||||
\"filterQuery\": \"content.size:[0 TO 102400]\"
|
||||
},
|
||||
{
|
||||
\"count\": 0,
|
||||
\"label\": \"large\",
|
||||
\"filterQuery\": \"content.size:[1048576 TO 16777216]\"
|
||||
},
|
||||
{
|
||||
\"count\": 0,
|
||||
\"label\": \"medium\",
|
||||
\"filterQuery\": \"content.size:[102400 TO 1048576]\"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
|
||||
Range Faceting is supported by the **ranges JSON body parameter**, for example:
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"presentation\"
|
||||
},
|
||||
\"ranges\": [
|
||||
{
|
||||
\"field\": \"content.size\",
|
||||
\"start\": \"0\",
|
||||
\"end\": \"100\",
|
||||
\"gap\": \"20\",
|
||||
\"hardend\": true
|
||||
},
|
||||
{
|
||||
\"field\": \"created\",
|
||||
\"start\": \"2015-09-29T10:45:15.729Z\",
|
||||
\"end\": \"2016-09-29T10:45:15.729Z\",
|
||||
\"gap\": \"+100DAY\"
|
||||
}]
|
||||
}
|
||||
|
||||
An example query for **search highlighting** could look like this:
|
||||
JSON
|
||||
{
|
||||
\"query\": {
|
||||
\"query\": \"description:workflow\",
|
||||
\"userQuery\":\"workflow\"
|
||||
},
|
||||
\"highlight\": {
|
||||
\"prefix\": \"¿\",
|
||||
\"postfix\": \"?\",
|
||||
\"mergeContiguous\": true,
|
||||
\"fields\": [
|
||||
{
|
||||
\"field\": \"cm:title\"
|
||||
},
|
||||
{
|
||||
\"field\": \"description\",
|
||||
\"prefix\": \"(\",
|
||||
\"postfix\": \")\"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
The example above changes the highlighting prefix and postfix from the
|
||||
default <em> for all fields to ¿? and just for the \"description\" field to ().
|
||||
The highlight information is added in each node entry response; here is
|
||||
an example partial response:
|
||||
|
||||
\"entry\": {
|
||||
\"createdAt\": \"2016-10-12T15:24:31.202+0000\",
|
||||
\"isFolder\": true,
|
||||
\"search\": {
|
||||
\"score\": 1,
|
||||
\"highlight\": [
|
||||
{
|
||||
\"field\": \"cm:title\",
|
||||
\"snippets\": [
|
||||
\"Customized ¿Workflow? Process Definitions\"
|
||||
]
|
||||
},
|
||||
{
|
||||
\"field\": \"description\",
|
||||
\"snippets\": [
|
||||
\"Customized (Workflow) Process Definitions\"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import SearchApi from 'SearchApi';
|
||||
import { AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
this.alfrescoApi = new AlfrescoApi();
|
||||
this.alfrescoApi.setConfig({
|
||||
hostEcm: 'http://127.0.0.1:8080'
|
||||
});
|
||||
|
||||
let searchApi = new SearchApi(this.alfrescoApi);
|
||||
|
||||
|
||||
searchApi.search(queryBody).then((data) => {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**queryBody** | [**SearchRequest**](SearchRequest.md)| Generic query API
|
||||
|
|
||||
|
||||
### Return type
|
||||
|
||||
[**ResultSetPaging**](ResultSetPaging.md)
|
||||
|
10
lib/js-api/src/api/search-rest-api/docs/SearchEntry.md
Normal file
10
lib/js-api/src/api/search-rest-api/docs/SearchEntry.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# SearchEntry
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**score** | **number** | The score for this row | [optional] [default to null]
|
||||
**highlight** | [**SearchEntryHighlight[]**](SearchEntryHighlight.md) | Highlight fragments if requested and available. A match can happen in any of the requested field.
|
||||
| [optional] [default to null]
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# SearchEntryHighlight
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**field** | **string** | The field where a match occurred (one of the fields defined on the request) | [optional] [default to null]
|
||||
**snippets** | **string[]** | Any number of snippets for the specified field highlighting the matching text | [optional] [default to null]
|
||||
|
||||
|
27
lib/js-api/src/api/search-rest-api/docs/SearchRequest.md
Normal file
27
lib/js-api/src/api/search-rest-api/docs/SearchRequest.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# SearchRequest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**query** | [**RequestQuery**](RequestQuery.md) | | [default to null]
|
||||
**paging** | [**RequestPagination**](RequestPagination.md) | | [optional] [default to null]
|
||||
**include** | [**RequestInclude**](RequestInclude.md) | | [optional] [default to null]
|
||||
**includeRequest** | **boolean** | When true, include the original request in the response | [optional] [default to null]
|
||||
**fields** | [**RequestFields**](RequestFields.md) | | [optional] [default to null]
|
||||
**sort** | [**RequestSortDefinition**](RequestSortDefinition.md) | | [optional] [default to null]
|
||||
**templates** | [**RequestTemplates**](RequestTemplates.md) | | [optional] [default to null]
|
||||
**defaults** | [**RequestDefaults**](RequestDefaults.md) | | [optional] [default to null]
|
||||
**localization** | [**RequestLocalization**](RequestLocalization.md) | | [optional] [default to null]
|
||||
**filterQueries** | [**RequestFilterQueries**](RequestFilterQueries.md) | | [optional] [default to null]
|
||||
**facetQueries** | [**RequestFacetQueries**](RequestFacetQueries.md) | | [optional] [default to null]
|
||||
**facetFields** | [**RequestFacetFields**](RequestFacetFields.md) | | [optional] [default to null]
|
||||
**facetIntervals** | [**RequestFacetIntervals**](RequestFacetIntervals.md) | | [optional] [default to null]
|
||||
**pivots** | [**RequestPivot[]**](RequestPivot.md) | | [optional] [default to null]
|
||||
**stats** | [**RequestStats[]**](RequestStats.md) | | [optional] [default to null]
|
||||
**spellcheck** | [**RequestSpellcheck**](RequestSpellcheck.md) | | [optional] [default to null]
|
||||
**scope** | [**RequestScope**](RequestScope.md) | | [optional] [default to null]
|
||||
**limits** | [**RequestLimits**](RequestLimits.md) | | [optional] [default to null]
|
||||
**highlight** | [**RequestHighlight**](RequestHighlight.md) | | [optional] [default to null]
|
||||
**ranges** | [**RequestRange[]**](RequestRange.md) | | [optional] [default to null]
|
||||
|
||||
|
9
lib/js-api/src/api/search-rest-api/docs/UserInfo.md
Normal file
9
lib/js-api/src/api/search-rest-api/docs/UserInfo.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# UserInfo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**displayName** | **string** | | [default to null]
|
||||
**id** | **string** | | [default to null]
|
||||
|
||||
|
19
lib/js-api/src/api/search-rest-api/index.ts
Normal file
19
lib/js-api/src/api/search-rest-api/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './model';
|
24
lib/js-api/src/api/search-rest-api/model/contentInfo.ts
Normal file
24
lib/js-api/src/api/search-rest-api/model/contentInfo.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface ContentInfo {
|
||||
mimeType: string;
|
||||
mimeTypeName: string;
|
||||
sizeInBytes: number;
|
||||
encoding?: string;
|
||||
mimeTypeGroup?: string;
|
||||
}
|
46
lib/js-api/src/api/search-rest-api/model/genericBucket.ts
Normal file
46
lib/js-api/src/api/search-rest-api/model/genericBucket.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { GenericBucketBucketInfo } from './genericBucketBucketInfo';
|
||||
import { GenericMetric } from './genericMetric';
|
||||
|
||||
/**
|
||||
* A bucket of facet results
|
||||
*/
|
||||
export interface GenericBucket {
|
||||
/**
|
||||
* The bucket label
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* The filter query you can use to apply this facet
|
||||
*/
|
||||
filterQuery?: string;
|
||||
/**
|
||||
* An optional field for additional display information
|
||||
*/
|
||||
display?: any;
|
||||
/**
|
||||
* An array of buckets and values
|
||||
*/
|
||||
metrics?: GenericMetric[];
|
||||
/**
|
||||
* Additional list of nested facets
|
||||
*/
|
||||
facets?: any[];
|
||||
bucketInfo?: GenericBucketBucketInfo;
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Additional information of nested facet
|
||||
*/
|
||||
export interface GenericBucketBucketInfo {
|
||||
/**
|
||||
* The start of range
|
||||
*/
|
||||
start?: string;
|
||||
/**
|
||||
* Includes values greater or equal to \"start\"
|
||||
*/
|
||||
startInclusive?: boolean;
|
||||
/**
|
||||
* The end of range
|
||||
*/
|
||||
end?: string;
|
||||
/**
|
||||
* Includes values less than or equal to \"end\"
|
||||
*/
|
||||
endInclusive?: boolean;
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { GenericBucket } from './genericBucket';
|
||||
|
||||
export interface GenericFacetResponse {
|
||||
/**
|
||||
* The facet type, eg. interval, range, pivot, stats
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The field name or its explicit label, if provided on the request
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* An array of buckets and values
|
||||
*/
|
||||
buckets?: GenericBucket[];
|
||||
}
|
30
lib/js-api/src/api/search-rest-api/model/genericMetric.ts
Normal file
30
lib/js-api/src/api/search-rest-api/model/genericMetric.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A metric used in faceting
|
||||
*/
|
||||
export interface GenericMetric {
|
||||
/**
|
||||
* The type of metric, e.g. count
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The metric value, e.g. {\"count\": 34}
|
||||
*/
|
||||
value?: any;
|
||||
}
|
61
lib/js-api/src/api/search-rest-api/model/index.ts
Normal file
61
lib/js-api/src/api/search-rest-api/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './genericBucket';
|
||||
export * from './genericBucketBucketInfo';
|
||||
export * from './genericFacetResponse';
|
||||
export * from './genericMetric';
|
||||
export * from './requestDefaults';
|
||||
export * from './requestFacetField';
|
||||
export * from './requestFacetFields';
|
||||
export * from './requestFacetIntervals';
|
||||
export * from './requestFacetIntervalsIntervals';
|
||||
export * from './requestFacetQueries';
|
||||
export * from './requestFacetQueriesInner';
|
||||
export * from './requestFacetSet';
|
||||
export * from './requestFields';
|
||||
export * from './requestFilterQueries';
|
||||
export * from './requestFilterQueriesInner';
|
||||
export * from './requestHighlight';
|
||||
export * from './requestHighlightFields';
|
||||
export * from './requestInclude';
|
||||
export * from './requestLimits';
|
||||
export * from './requestLocalization';
|
||||
export * from './requestPagination';
|
||||
export * from './requestPivot';
|
||||
export * from './requestQuery';
|
||||
export * from './requestRange';
|
||||
export * from './requestScope';
|
||||
export * from './requestSortDefinition';
|
||||
export * from './requestSortDefinitionInner';
|
||||
export * from './requestSpellcheck';
|
||||
export * from './requestStats';
|
||||
export * from './requestTemplates';
|
||||
export * from './requestTemplatesInner';
|
||||
export * from './responseConsistency';
|
||||
export * from './resultBuckets';
|
||||
export * from './resultBucketsBuckets';
|
||||
export * from './resultSetContext';
|
||||
export * from './resultSetContextFacetQueries';
|
||||
export * from './resultSetContextSpellcheck';
|
||||
export * from './resultSetPaging';
|
||||
export * from './resultSetPagingList';
|
||||
export * from './resultSetRowEntry';
|
||||
export * from './searchEntry';
|
||||
export * from './searchEntryHighlight';
|
||||
export * from './searchRequest';
|
||||
export * from './resultNode';
|
45
lib/js-api/src/api/search-rest-api/model/requestDefaults.ts
Normal file
45
lib/js-api/src/api/search-rest-api/model/requestDefaults.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common query defaults
|
||||
*/
|
||||
export interface RequestDefaults {
|
||||
/**
|
||||
* A list of query fields/properties used to expand TEXT: queries.
|
||||
* The default is cm:content.
|
||||
* You could include all content properties using d:content or list all individual content properties or types.
|
||||
* As more terms are included the query size, complexity, memory impact and query time will increase.
|
||||
*/
|
||||
textAttributes?: string[];
|
||||
/**
|
||||
* The default way to combine query parts when AND or OR is not explicitly stated - includes ! - +
|
||||
* one two three
|
||||
* (one two three)
|
||||
*/
|
||||
defaultFTSOperator?: 'AND' | 'OR' | string;
|
||||
/**
|
||||
* The default way to combine query parts in field query groups when AND or OR is not explicitly stated - includes ! - +
|
||||
* FIELD:(one two three)
|
||||
*/
|
||||
defaultFTSFieldOperator?: 'AND' | 'OR' | string;
|
||||
/**
|
||||
* The default name space to use if one is not provided
|
||||
*/
|
||||
namespace?: string;
|
||||
defaultFieldName?: string;
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A simple facet field
|
||||
*/
|
||||
export interface RequestFacetField {
|
||||
/**
|
||||
* The facet field
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
* A label to include in place of the facet field
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* Restricts the possible constraints to only indexed values with a specified prefix.
|
||||
*/
|
||||
prefix?: string;
|
||||
sort?: 'COUNT' | 'INDEX' | string;
|
||||
method?: 'ENUM' | 'FC' | string;
|
||||
/**
|
||||
* When true, count results that match the query but which have no facet value for the field (in addition to the Term-based constraints).
|
||||
*/
|
||||
missing?: boolean;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
/**
|
||||
* The minimum count required for a facet field to be included in the response.
|
||||
*/
|
||||
mincount?: number;
|
||||
facetEnumCacheMinDf?: number;
|
||||
/**
|
||||
* Filter Queries with tags listed here will not be included in facet counts.
|
||||
* This is used for multi-select facetting.
|
||||
*/
|
||||
excludeFilters?: string[];
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestFacetField } from './requestFacetField';
|
||||
|
||||
/**
|
||||
* Simple facet fields to include
|
||||
* The Properties reflect the global properties related to field facts in SOLR.
|
||||
* They are described in detail by the SOLR documentation
|
||||
*/
|
||||
export interface RequestFacetFields {
|
||||
/**
|
||||
* Define specific fields on which to facet (adds SOLR facet.field and f.<field>.facet.* options)
|
||||
*/
|
||||
facets?: RequestFacetField[];
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestFacetIntervalsIntervals } from './requestFacetIntervalsIntervals';
|
||||
import { RequestFacetSet } from './requestFacetSet';
|
||||
|
||||
/**
|
||||
* Facet Intervals
|
||||
*/
|
||||
export interface RequestFacetIntervals {
|
||||
/**
|
||||
* Sets the intervals for all fields.
|
||||
*/
|
||||
sets?: RequestFacetSet[];
|
||||
/**
|
||||
* Specifies the fields to facet by interval.
|
||||
*/
|
||||
intervals?: RequestFacetIntervalsIntervals[];
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestFacetSet } from './requestFacetSet';
|
||||
|
||||
export interface RequestFacetIntervalsIntervals {
|
||||
/**
|
||||
* The field to facet on
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
* A label to use to identify the field facet
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* Sets the intervals for all fields.
|
||||
*/
|
||||
sets?: RequestFacetSet[];
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestFacetQueriesInner } from './requestFacetQueriesInner';
|
||||
|
||||
/**
|
||||
* Facet queries to include
|
||||
*/
|
||||
export interface RequestFacetQueries extends Array<RequestFacetQueriesInner> {}
|
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestFacetQueriesInner {
|
||||
/**
|
||||
* A facet query
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* A label to include in place of the facet query
|
||||
*/
|
||||
label?: string;
|
||||
}
|
42
lib/js-api/src/api/search-rest-api/model/requestFacetSet.ts
Normal file
42
lib/js-api/src/api/search-rest-api/model/requestFacetSet.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The interval to Set
|
||||
*/
|
||||
export interface RequestFacetSet {
|
||||
/**
|
||||
* A label to use to identify the set
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* The start of the range
|
||||
*/
|
||||
start?: string;
|
||||
/**
|
||||
* The end of the range
|
||||
*/
|
||||
end?: string;
|
||||
/**
|
||||
* When true, the set will include values greater or equal to \"start\"
|
||||
*/
|
||||
startInclusive?: boolean;
|
||||
/**
|
||||
* When true, the set will include values less than or equal to \"end\"
|
||||
*/
|
||||
endInclusive?: boolean;
|
||||
}
|
24
lib/js-api/src/api/search-rest-api/model/requestFields.ts
Normal file
24
lib/js-api/src/api/search-rest-api/model/requestFields.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of field names.
|
||||
You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.
|
||||
The list applies to a returned individual entity or entries within a collection.
|
||||
If the **include** parameter is used as well then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
|
||||
*/
|
||||
export interface RequestFields extends Array<string> {}
|
@@ -0,0 +1,23 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestFilterQueriesInner } from './requestFilterQueriesInner';
|
||||
|
||||
/**
|
||||
* Filter Queries. Constraints that apply to the results set but do not affect the score of each entry.
|
||||
*/
|
||||
export interface RequestFilterQueries extends Array<RequestFilterQueriesInner> {}
|
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestFilterQueriesInner {
|
||||
/**
|
||||
* The filter query expression.
|
||||
* For multi-select facets selected facets must be order together
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* Tags used exclude the filters from facet evaluation for multi-select facet support
|
||||
*/
|
||||
tags?: string[];
|
||||
}
|
57
lib/js-api/src/api/search-rest-api/model/requestHighlight.ts
Normal file
57
lib/js-api/src/api/search-rest-api/model/requestHighlight.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestHighlightFields } from './requestHighlightFields';
|
||||
|
||||
/**
|
||||
* Request that highlight fragments to be added to result set rows
|
||||
* The properties reflect SOLR highlighting parameters.
|
||||
*/
|
||||
export interface RequestHighlight {
|
||||
/**
|
||||
* The string used to mark the start of a highlight in a fragment.
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* The string used to mark the end of a highlight in a fragment.
|
||||
*/
|
||||
postfix?: string;
|
||||
/**
|
||||
* The maximum number of distinct highlight snippets to return for each highlight field.
|
||||
*/
|
||||
snippetCount?: number;
|
||||
/**
|
||||
* The character length of each snippet.
|
||||
*/
|
||||
fragmentSize?: number;
|
||||
/**
|
||||
* The number of characters to be considered for highlighting. Matches after this count will not be shown.
|
||||
*/
|
||||
maxAnalyzedChars?: number;
|
||||
/**
|
||||
* If fragments over lap they can be merged into one larger fragment
|
||||
*/
|
||||
mergeContiguous?: boolean;
|
||||
/**
|
||||
* Should phrases be identified.
|
||||
*/
|
||||
usePhraseHighlighter?: boolean;
|
||||
/**
|
||||
* The fields to highlight and field specific configuration properties for each field
|
||||
*/
|
||||
fields?: RequestHighlightFields[];
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestHighlightFields {
|
||||
/**
|
||||
* The name of the field to highlight.
|
||||
*/
|
||||
field?: string;
|
||||
snippetCount?: number;
|
||||
fragmentSize?: number;
|
||||
mergeContiguous?: boolean;
|
||||
prefix?: string;
|
||||
postfix?: string;
|
||||
}
|
27
lib/js-api/src/api/search-rest-api/model/requestInclude.ts
Normal file
27
lib/js-api/src/api/search-rest-api/model/requestInclude.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns additional information about the node. The following optional fields can be requested:
|
||||
* properties
|
||||
* aspectNames
|
||||
* path
|
||||
* isLink
|
||||
* allowableOperations
|
||||
* association
|
||||
*/
|
||||
export interface RequestInclude extends Array<string> {}
|
30
lib/js-api/src/api/search-rest-api/model/requestLimits.ts
Normal file
30
lib/js-api/src/api/search-rest-api/model/requestLimits.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Limit the time and resources used for query execution
|
||||
*/
|
||||
export interface RequestLimits {
|
||||
/**
|
||||
* Maximum time for post query permission evaluation
|
||||
*/
|
||||
permissionEvaluationTime?: number;
|
||||
/**
|
||||
* Maximum count of post query permission evaluations
|
||||
*/
|
||||
permissionEvaluationCount?: number;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Localization settings
|
||||
*/
|
||||
export interface RequestLocalization {
|
||||
/**
|
||||
* A valid timezone id supported by @see java.time.ZoneId
|
||||
*/
|
||||
timezone?: string;
|
||||
/**
|
||||
* A list of Locales defined by IETF BCP 47. The ordering is significant. The first locale (leftmost) is used for sort and query localization, whereas the remaining locales are used for query only.
|
||||
*/
|
||||
locales?: string[];
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestPagination {
|
||||
/**
|
||||
* The maximum number of items to return in the query results
|
||||
*/
|
||||
maxItems?: number;
|
||||
/**
|
||||
* The number of items to skip from the start of the query set
|
||||
*/
|
||||
skipCount?: number;
|
||||
}
|
27
lib/js-api/src/api/search-rest-api/model/requestPivot.ts
Normal file
27
lib/js-api/src/api/search-rest-api/model/requestPivot.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of pivots.
|
||||
*/
|
||||
export interface RequestPivot {
|
||||
/**
|
||||
* A key corresponding to a matching field facet label or stats.
|
||||
*/
|
||||
key?: string;
|
||||
pivots?: RequestPivot[];
|
||||
}
|
34
lib/js-api/src/api/search-rest-api/model/requestQuery.ts
Normal file
34
lib/js-api/src/api/search-rest-api/model/requestQuery.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Query.
|
||||
*/
|
||||
export interface RequestQuery {
|
||||
/**
|
||||
* The query language in which the query is written.
|
||||
*/
|
||||
language?: 'afts' | 'lucene' | 'cmis' | string;
|
||||
/**
|
||||
* The exact search request typed in by the user
|
||||
*/
|
||||
userQuery?: string;
|
||||
/**
|
||||
* The query which may have been generated in some way from the userQuery
|
||||
*/
|
||||
query: string;
|
||||
}
|
58
lib/js-api/src/api/search-rest-api/model/requestRange.ts
Normal file
58
lib/js-api/src/api/search-rest-api/model/requestRange.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Facet range
|
||||
*/
|
||||
export interface RequestRange {
|
||||
/**
|
||||
* The name of the field to perform range
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
* The start of the range
|
||||
*/
|
||||
start?: string;
|
||||
/**
|
||||
* The end of the range
|
||||
*/
|
||||
end?: string;
|
||||
/**
|
||||
* Bucket size
|
||||
*/
|
||||
gap?: string;
|
||||
/**
|
||||
* If true means that the last bucket will end at “end” even if it is less than “gap” wide.
|
||||
*/
|
||||
hardend?: boolean;
|
||||
/**
|
||||
* before, after, between, non, all
|
||||
*/
|
||||
other?: string[];
|
||||
/**
|
||||
* lower, upper, edge, outer, all
|
||||
*/
|
||||
include?: string[];
|
||||
/**
|
||||
* A label to include as a pivot reference
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* Filter queries to exclude when calculating statistics
|
||||
*/
|
||||
excludeFilters?: string[];
|
||||
}
|
26
lib/js-api/src/api/search-rest-api/model/requestScope.ts
Normal file
26
lib/js-api/src/api/search-rest-api/model/requestScope.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Scope
|
||||
*/
|
||||
export interface RequestScope {
|
||||
/**
|
||||
* The locations to include in the query
|
||||
*/
|
||||
locations?: 'nodes' | 'versions' | 'deleted-nodes' | string;
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestSortDefinitionInner } from './requestSortDefinitionInner';
|
||||
|
||||
/**
|
||||
* How to sort the rows? An array of sort specifications. The array order defines the ordering precedence.
|
||||
*/
|
||||
export interface RequestSortDefinition extends Array<RequestSortDefinitionInner> {}
|
@@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestSortDefinitionInner {
|
||||
/**
|
||||
* How to order - using a field, when position of the document in the index, score/relevance.
|
||||
*/
|
||||
type?: 'FIELD' | 'DOCUMENT' | 'SCORE' | string;
|
||||
/**
|
||||
* The name of the field
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
* The sort order. (The ordering of nulls is determined by the SOLR configuration)
|
||||
*/
|
||||
ascending?: boolean;
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Request that spellcheck fragments to be added to result set rows
|
||||
* The properties reflect SOLR spellcheck parameters.
|
||||
*/
|
||||
export interface RequestSpellcheck {
|
||||
query?: string;
|
||||
}
|
86
lib/js-api/src/api/search-rest-api/model/requestStats.ts
Normal file
86
lib/js-api/src/api/search-rest-api/model/requestStats.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of stats request.
|
||||
*/
|
||||
export interface RequestStats {
|
||||
/**
|
||||
* The stats field
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
* A label to include for reference the stats field
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* The minimum value of the field
|
||||
*/
|
||||
min?: boolean;
|
||||
/**
|
||||
* The maximum value of the field
|
||||
*/
|
||||
max?: boolean;
|
||||
/**
|
||||
* The sum of all values of the field
|
||||
*/
|
||||
sum?: boolean;
|
||||
/**
|
||||
* The number which have a value for this field
|
||||
*/
|
||||
countValues?: boolean;
|
||||
/**
|
||||
* The number which do not have a value for this field
|
||||
*/
|
||||
missing?: boolean;
|
||||
/**
|
||||
* The average
|
||||
*/
|
||||
mean?: boolean;
|
||||
/**
|
||||
* Standard deviation
|
||||
*/
|
||||
stddev?: boolean;
|
||||
/**
|
||||
* Sum of all values squared
|
||||
*/
|
||||
sumOfSquares?: boolean;
|
||||
/**
|
||||
* The set of all distinct values for the field (This can be very expensive to calculate)
|
||||
*/
|
||||
distinctValues?: boolean;
|
||||
/**
|
||||
* The number of distinct values (This can be very expensive to calculate)
|
||||
*/
|
||||
countDistinct?: boolean;
|
||||
/**
|
||||
* A statistical approximation of the number of distinct values
|
||||
*/
|
||||
cardinality?: boolean;
|
||||
/**
|
||||
* Number between 0.0 and 1.0 indicating how aggressively the algorithm should try to be accurate. Used with boolean cardinality flag.
|
||||
*/
|
||||
cardinalityAccuracy?: number;
|
||||
/**
|
||||
* A list of filters to exclude
|
||||
*/
|
||||
excludeFilters?: string[];
|
||||
/**
|
||||
* A list of percentile values, e.g. \"1,99,99.9\"
|
||||
*/
|
||||
percentiles?: number[];
|
||||
}
|
27
lib/js-api/src/api/search-rest-api/model/requestTemplates.ts
Normal file
27
lib/js-api/src/api/search-rest-api/model/requestTemplates.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RequestTemplatesInner } from './requestTemplatesInner';
|
||||
|
||||
/**
|
||||
* Templates used for query expansion.
|
||||
* A template called \"WOOF\" defined as \"%(cm:name cm:title)\" allows
|
||||
* WOOF:example
|
||||
* to generate
|
||||
* cm:name:example cm:name:example
|
||||
*/
|
||||
export interface RequestTemplates extends Array<RequestTemplatesInner> {}
|
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface RequestTemplatesInner {
|
||||
/**
|
||||
* The template name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The template
|
||||
*/
|
||||
template?: string;
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The consistency state of the index used to execute the query
|
||||
*/
|
||||
export interface ResponseConsistency {
|
||||
/**
|
||||
* The id of the last indexed transaction
|
||||
*/
|
||||
lastTxId?: number;
|
||||
}
|
29
lib/js-api/src/api/search-rest-api/model/resultBuckets.ts
Normal file
29
lib/js-api/src/api/search-rest-api/model/resultBuckets.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ResultBucketsBuckets } from './resultBucketsBuckets';
|
||||
|
||||
export interface ResultBuckets {
|
||||
/**
|
||||
* The field name or its explicit label, if provided on the request
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* An array of buckets and values
|
||||
*/
|
||||
buckets?: ResultBucketsBuckets[];
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface ResultBucketsBuckets {
|
||||
/**
|
||||
* The bucket label
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* The filter query you can use to apply this facet
|
||||
*/
|
||||
filterQuery?: string;
|
||||
/**
|
||||
* The count for the bucket
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
* An optional field for additional display information
|
||||
*/
|
||||
display?: any;
|
||||
}
|
63
lib/js-api/src/api/search-rest-api/model/resultNode.ts
Normal file
63
lib/js-api/src/api/search-rest-api/model/resultNode.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentInfo, PathInfo, UserInfo } from '../../content-rest-api';
|
||||
import { DateAlfresco } from '../../content-custom-api';
|
||||
import { SearchEntry } from './searchEntry';
|
||||
|
||||
export class ResultNode {
|
||||
id: string;
|
||||
/**
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |.
|
||||
* The character . must not be used at the end of the name.
|
||||
*/
|
||||
name: string;
|
||||
nodeType: string;
|
||||
isFolder: boolean;
|
||||
isFile: boolean;
|
||||
isLocked?: boolean;
|
||||
modifiedAt?: Date;
|
||||
modifiedByUser?: UserInfo;
|
||||
createdAt?: Date;
|
||||
createdByUser?: UserInfo;
|
||||
parentId?: string;
|
||||
isLink?: boolean;
|
||||
content?: ContentInfo;
|
||||
aspectNames?: string[];
|
||||
properties?: any;
|
||||
allowableOperations?: string[];
|
||||
path?: PathInfo;
|
||||
search?: SearchEntry;
|
||||
archivedByUser?: UserInfo;
|
||||
archivedAt?: Date;
|
||||
versionLabel?: string;
|
||||
versionComment?: string;
|
||||
|
||||
constructor(input?: Partial<ResultNode>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.modifiedAt = input.modifiedAt ? DateAlfresco.parseDate(input.modifiedAt) : undefined;
|
||||
this.modifiedByUser = input.modifiedByUser ? new UserInfo(input.modifiedByUser) : undefined;
|
||||
this.createdAt = input.createdAt ? DateAlfresco.parseDate(input.createdAt) : undefined;
|
||||
this.createdByUser = input.createdByUser ? new UserInfo(input.createdByUser) : undefined;
|
||||
this.content = input.content ? new ContentInfo(input.content) : undefined;
|
||||
this.path = input.path ? new PathInfo(input.path) : undefined;
|
||||
this.archivedByUser = input.archivedByUser ? new UserInfo(input.archivedByUser) : undefined;
|
||||
this.archivedAt = input.archivedAt ? DateAlfresco.parseDate(input.archivedAt) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
50
lib/js-api/src/api/search-rest-api/model/resultSetContext.ts
Normal file
50
lib/js-api/src/api/search-rest-api/model/resultSetContext.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { GenericFacetResponse } from './genericFacetResponse';
|
||||
import { ResponseConsistency } from './responseConsistency';
|
||||
import { ResultBuckets } from './resultBuckets';
|
||||
import { ResultSetContextFacetQueries } from './resultSetContextFacetQueries';
|
||||
import { ResultSetContextSpellcheck } from './resultSetContextSpellcheck';
|
||||
import { SearchRequest } from './searchRequest';
|
||||
|
||||
/**
|
||||
* Context that applies to the whole result set
|
||||
*/
|
||||
export interface ResultSetContext {
|
||||
consistency?: ResponseConsistency;
|
||||
request?: SearchRequest;
|
||||
/**
|
||||
* The counts from facet queries
|
||||
*/
|
||||
facetQueries?: ResultSetContextFacetQueries[];
|
||||
/**
|
||||
* The counts from field facets
|
||||
*/
|
||||
facetsFields?: ResultBuckets[];
|
||||
/**
|
||||
* The faceted response
|
||||
*/
|
||||
facets?: GenericFacetResponse[];
|
||||
/**
|
||||
* Suggested corrections
|
||||
* If zero results were found for the original query then a single entry of type \"searchInsteadFor\" will be returned.
|
||||
* If alternatives were found that return more results than the original query they are returned as \"didYouMean\" options.
|
||||
* The highest quality suggestion is first.
|
||||
*/
|
||||
spellcheck?: ResultSetContextSpellcheck[];
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface ResultSetContextFacetQueries {
|
||||
label?: string;
|
||||
/**
|
||||
* The filter query you can use to apply this facet
|
||||
*/
|
||||
filterQuery?: string;
|
||||
count?: number;
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface ResultSetContextSpellcheck {
|
||||
type?: 'searchInsteadFor' | 'didYouMean' | string;
|
||||
/**
|
||||
* A suggested alternative query
|
||||
*/
|
||||
suggestion?: string[];
|
||||
}
|
32
lib/js-api/src/api/search-rest-api/model/resultSetPaging.ts
Normal file
32
lib/js-api/src/api/search-rest-api/model/resultSetPaging.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ResultSetPagingList } from './resultSetPagingList';
|
||||
|
||||
/**
|
||||
* Query results
|
||||
*/
|
||||
export class ResultSetPaging {
|
||||
list?: ResultSetPagingList;
|
||||
|
||||
constructor(input?: Partial<ResultSetPaging>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.list = input.list ? new ResultSetPagingList(input.list) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Pagination } from '../../content-rest-api';
|
||||
import { ResultSetContext } from './resultSetContext';
|
||||
import { ResultSetRowEntry } from './resultSetRowEntry';
|
||||
|
||||
export class ResultSetPagingList {
|
||||
pagination?: Pagination;
|
||||
context?: ResultSetContext;
|
||||
entries?: ResultSetRowEntry[];
|
||||
|
||||
constructor(input?: Partial<ResultSetPagingList>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.pagination = input.pagination ? new Pagination(input.pagination) : undefined;
|
||||
if (input.entries) {
|
||||
this.entries = input.entries.map((item) => new ResultSetRowEntry(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ResultNode } from './resultNode';
|
||||
|
||||
/**
|
||||
* A row in the result set
|
||||
*/
|
||||
export class ResultSetRowEntry {
|
||||
entry: ResultNode;
|
||||
|
||||
constructor(input?: Partial<ResultSetRowEntry>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.entry = input.entry ? new ResultNode(input.entry) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user