Skip to content

Commit

Permalink
Update schema for latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 27, 2024
1 parent e8fec7c commit ba3457b
Showing 1 changed file with 136 additions and 9 deletions.
145 changes: 136 additions & 9 deletions schema/latest/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"recentSuggestionsConfig",
"enablePopularSuggestions",
"popularSuggestionsConfig",
"enableFAQSuggestions",
"FAQSuggestionsConfig",
"showDistinctSuggestions",
"enablePredictiveSuggestions",
"maxPredictedWords",
Expand All @@ -86,9 +88,67 @@
"includeValues",
"excludeValues",
"searchboxId",
"range"
"faqSearchboxId",
"range",
"enableAI",
"AIConfig",
"compoundClause",
"enableDocumentSuggestions",
"documentSuggestionsConfig"
],
"properties": {
"AIConfig": {
"additionalProperties": false,
"description": "Configuration for the AnswerAI part of the query. This will only be considered if 'enableAI' is set to 'true'",
"engine": "opensearch",
"markdownDescription": "This field adds support for passing various details for the AIAnswer functionality. There are multiple fields accepted in this object. Following is an example body:\n\n```json\n{\n 'docTemplate': '${source.title} is ${source.overview} with url ${source.backdrop_path}',\n 'queryTemplate': 'Can you tell me about ${value}'\n}\n```\n\nThe fields supported by the AIConfig object are: \n\n- **docTemplate**: Template to use for building the message sent to ChatGPT for every hit of the response. The `docTemplate` string supports dynamic values using the special syntax `${}`. These values are resolved while the ChatGPT request body is built. It supports keys that are present in the `_source` field in the response hits. As an example, `source.title` will resolve to `_source.title`. If values are not found, defaults to an empty string. \n- **queryTemplate**: Template to use for building the message that is sent to ChatGPT as the final question. Defaults to `Can you tell me about ${value}` where `value` is the `query.value`. The querytemplate string supports a dynamic value of `value` which is the query.value of the query. \n- **topDocsForContext**: Number of docs to use to build the context. Defaults to 3. This has an upper limit as the total number of hits returned. \n- **systemPrompt**: The system prompt to send as the first message to ChatGPT. Defaults to `You are a helpful assistant`.\n- **maxTokens**: The maximum tokens that can be used for the output. Defaults to 300. Accepts a value between [1, 2048]. \n- **minTokens**: Minimum number of tokens to generate in the response. Whenever possible, max tokens is respected, however when the input context + max tokens combined exceed the model limit, the min tokens value is used to calibrate for an optimum output token. Defaults to 100. \n- **temperature**: A control for randomness, a lower value implies a more deterministic output. Defaults to 1, valid values are between [0, 2].",
"properties": {
"docTemplate": {
"type": "string"
},
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
"strictSelection": {
"type": "boolean"
},
"systemPrompt": {
"type": "string"
},
"temperature": {
"type": "number"
},
"topDocsForContext": {
"type": "integer"
}
},
"title": "AI Config",
"type": "object"
},
"FAQSuggestionsConfig": {
"additionalProperties": false,
"description": "additional options for getting FAQ suggestions",
"engine": [
"elasticsearch",
"opensearch"
],
"properties": {
"sectionLabel": {
"type": "string"
},
"size": {
"type": "integer"
}
},
"title": "FAQSuggestionsConfig",
"type": "object"
},
"after": {
"description": "pagination for aggregations",
"engine": [
Expand Down Expand Up @@ -219,6 +279,15 @@
},
"title": "categoryValue"
},
"compoundClause": {
"description": "Configure whether the DSL query is generated with the compound clause of 'must' (default for 'search' and 'geo') or 'filter' (default for 'range' and 'term'). Setting the compound clause to filter allows search engine to cache and allows for higher throughput in cases where scoring isn't relevant (e.g. term",
"engine": [
"opensearch",
"elasticsearch"
],
"title": "Compound Clause",
"type": "integer"
},
"customHighlight": {
"description": "(deprecated) same as highlightConfig",
"engine": [
Expand Down Expand Up @@ -351,6 +420,46 @@
"title": "distinctFieldConfig",
"type": "object"
},
"documentSuggestionsConfig": {
"additionalProperties": false,
"description": "additional options to specify for document suggestions",
"engine": [
"elasticsearch",
"opensearch"
],
"properties": {
"from": {
"type": "integer"
},
"maxChars": {
"type": "integer"
},
"sectionLabel": {
"type": "string"
},
"size": {
"type": "integer"
}
},
"title": "documentSuggestionsConfig",
"type": "object"
},
"enableAI": {
"description": "Whether or not to enable Answer AI to inject AI based answer in the response",
"engine": "opensearch",
"markdownDescription": "This field indicates whether the query should use AIAnswer functionality to inject an answer response to the value",
"title": "enableAI",
"type": "boolean"
},
"enableDocumentSuggestions": {
"description": "whether or not to enable document suggestions",
"engine": [
"elasticsearch",
"opensearch"
],
"title": "enableDocumentSuggestions",
"type": "boolean"
},
"enableEndpointSuggestions": {
"description": "whether or not to enable endpoint suggestions",
"engine": [
Expand All @@ -361,6 +470,15 @@
"title": "enableEndpointSuggestions",
"type": "boolean"
},
"enableFAQSuggestions": {
"description": "whether or not to enable FAQ suggestions",
"engine": [
"elasticsearch",
"opensearch"
],
"title": "enableFAQSuggestions",
"type": "boolean"
},
"enableFeaturedSuggestions": {
"description": "whether or not to enable featured suggestions",
"engine": [
Expand Down Expand Up @@ -514,6 +632,15 @@
"title": "execute",
"type": "boolean"
},
"faqSearchboxId": {
"description": "searchbox id for a faq suggestion query",
"engine": [
"elasticsearch",
"opensearch"
],
"title": "faqSearchboxId",
"type": "string"
},
"featuredSuggestionsConfig": {
"additionalProperties": false,
"description": "additional options to specify for featured suggestions",
Expand All @@ -522,7 +649,7 @@
"solr",
"opensearch"
],
"markdownDescription": "To define options to apply featured suggestions. It can accept the following keys:\n\n- **featuredSuggestionsGroupId**: `string` The featured suggestions group id is required to apply the featured suggestions. A featured suggestion group is a collection of featured suggestions.\nEndpoint to create a featured suggestions group: https://api.reactivesearch.io/#bdf8961b-322f-48f9-9562-c3e507fd0508\n\n- **maxSuggestionsPerSection**: `int` To restrict the number of featured suggestions per section.\n\n- **sectionsOrder**: `Array\u003cstring\u003e` To define the order of sections to be displayed in UI. For e.g, `[\\'document\\', \\'pages\\', \\'help\\']`.\n\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| ------ | --------------------------- | -------- |\n| `Object` | `suggestion` | false |",
"markdownDescription": "To define options to apply featured suggestions. It can accept the following keys:\n\n- **maxSuggestionsPerSection**: `int` To restrict the number of featured suggestions per section.\n\n- **sectionsOrder**: `Array\u003cstring\u003e` To define the order of sections to be displayed in UI. For e.g, `[\\'document\\', \\'pages\\', \\'help\\']`.\n\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| ------ | --------------------------- | -------- |\n| `Object` | `suggestion` | false |",
"properties": {
"maxSuggestionsPerSection": {
"type": "integer"
Expand All @@ -549,7 +676,7 @@
"items": {
"type": "number"
},
"markdownDescription": "To set the search weight for the database fields, useful when you are using more than one [dataField](/docs/search/reactivesearch-api/reference/#datafield). This prop accepts an array of `floats`. A higher number implies a higher relevance weight for the corresponding field in the search results.\n\nFor example, the below query has two data fields defined and each field has a different field weight.\n\n```js\n{\n query: [{\n id: \"book-search\",\n dataField: [\"original_title\", \"description\"],\n fieldWeights: [3, 1],\n value: \"harry\"\n }]\n}\n```\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| ------------ | --------------------------- | -------- |\n| `Array\u003cint\u003e` | `search`,`suggestion` | false |\n\n\u003e Note: The `fieldWeights` property has been marked as deprecated in \u003cb\u003ev7.47.0\u003c/b\u003e and would be removed in the next major version of appbase.io. We recommend you to use the [dataField](/docs/search/reactivesearch-api/reference/#datafield) property to define the weights.",
"markdownDescription": "To set the search weight for the database fields, useful when you are using more than one [dataField](/docs/search/reactivesearch-api/reference/#datafield). This prop accepts an array of `floats`. A higher number implies a higher relevance weight for the corresponding field in the search results.\n\nFor example, the below query has two data fields defined and each field has a different field weight.\n\n```js\n{\n query: [{\n id: \"book-search\",\n dataField: [\"original_title\", \"description\"],\n fieldWeights: [3, 1],\n value: \"harry\"\n }]\n}\n```\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| ------------ | --------------------------- | -------- |\n| `Array\u003cint\u003e` | `search`,`suggestion` | false |\n\n\u003e Note: The `fieldWeights` property has been marked as deprecated in \u003cb\u003ev7.47.0\u003c/b\u003e and would be removed in the next major version of reactivesearch.io. We recommend you to use the [dataField](/docs/search/reactivesearch-api/reference/#datafield) property to define the weights.",
"title": "fieldWeights",
"type": "array"
},
Expand Down Expand Up @@ -578,7 +705,7 @@
"mongodb",
"opensearch"
],
"markdownDescription": "Useful for showing the correct results for an incorrect search parameter by taking the fuzziness into account. For example, with a substitution of one character, `fox` can become `box`. Read more about it in the elastic search https://www.elastic.co/guide/en/elasticsearch/guide/current/fuzziness.html.\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| -------------- | --------------------------- | -------- |\n| `int | string` | `search`, `suggestion` | false |\n\n\u003e Note:\n\u003e\n\u003e This property doesn\\'t work when the value of [queryFormat](/docs/search/reactivesearch-api/reference/#queryformat) property is set to `and`.\"",
"markdownDescription": "Useful for showing the correct results for an incorrect search parameter by taking the fuzziness into account. For example, with a substitution of one character, `fox` can become `box`. Read more about it in the elastic search https://www.elastic.co/guide/en/elasticsearch/guide/current/fuzziness.html.\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| -------------- | --------------------------- | -------- |\n| `int, string` | `search`, `suggestion` | false |\n\n\u003e Note:\n\u003e\n\u003e This property doesn\\'t work when the value of [queryFormat](/docs/search/reactivesearch-api/reference/#queryformat) property is set to `and`.\"",
"playgroundURL": {
"elasticsearch": "https://play.reactivesearch.io/embed/FfBZDt4981lxD2At3KuK",
"mongodb": "https://play.reactivesearch.io/embed/CGaSSGlTPUOPmL4wv6Xb",
Expand Down Expand Up @@ -1082,6 +1209,7 @@
"elasticsearch",
"opensearch"
],
"markdownDescription": "When featured suggestions are enabled, set the value of the `searchboxId` to use for fetching them. This is configurable via ReactiveSearch dashboard and the following [API endpoint](https://api.reactivesearch.io/#bdf8961b-322f-48f9-9562-c3e507fd0508).\n\n| \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eType\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eApplicable on query of type\u003c/p\u003e | \u003cp style=\"margin: 0px;\" class=\"table-header-text\"\u003eRequired\u003c/p\u003e |\n| ------ | --------------------------- | -------- |\n| `string` | `suggestion` | true* |",
"title": "searchboxId",
"type": "string"
},
Expand Down Expand Up @@ -1272,8 +1400,7 @@
"opensearch",
"mongodb",
"solr",
"zinc",
"marklogic"
"zinc"
],
"markdownDescription": "This field indicates the backend of ReactiveSearch. Backend implies the search service being used to store the data.\n\nAs of now, the `backend` field supports the following values:\n\n1. `elasticsearch`: ElasticSearch\n2. `opensearch`: OpenSearch\n\nwhere `elasticsearch` is the default value.\n\n\u003e This field is necessary if backend is OpenSearch and the kNN reordering of scripts are to be used.\n\nFollowing example indicates how to use this field to use kNN reordering with OpenSearch as backend:\n\n```json\n{\n \"query\": [\n {\n \"value\": \"sudoku\",\n \"vectorDataField\": \"name_vector\",\n \"queryVector\": [1.0, -0.2],\n }\n ],\n \"settings\": {\n \"backend\": \"opensearch\"\n }\n}\n```",
"title": "backend",
Expand All @@ -1285,7 +1412,7 @@
"elasticsearch",
"opensearch"
],
"markdownDescription": "`Object` It allows you to set the custom events which can be used to build your own analytics on top of the Appbase.io analytics. Further, these events can be used to filter the analytics stats from the Appbase.io dashboard. In the below example, we\\'re setting up two custom events that will be recorded with each search request.\n\n```js\n{\n query: [...],\n settings: {\n customEvents: {\n platform: \"android\",\n user_segment: \"paid\"\n }\n }\n}\n```",
"markdownDescription": "`Object` It allows you to set the custom events which can be used to build your own analytics on top of the ReactiveSearch.io analytics. Further, these events can be used to filter the analytics stats from the ReactiveSearch.io dashboard. In the below example, we\\'re setting up two custom events that will be recorded with each search request.\n\n```js\n{\n query: [...],\n settings: {\n customEvents: {\n platform: \"android\",\n user_segment: \"paid\"\n }\n }\n}\n```",
"title": "customEvents",
"type": "object"
},
Expand Down Expand Up @@ -1324,7 +1451,7 @@
"solr",
"opensearch"
],
"markdownDescription": "`bool` defaults to `false`. If `true` then it'll enable the recording of Appbase.io analytics.",
"markdownDescription": "`bool` defaults to `false`. If `true` then it'll enable the recording of ReactiveSearch.io analytics.",
"title": "recordAnalytics",
"type": "boolean"
},
Expand All @@ -1350,7 +1477,7 @@
"elasticsearch",
"opensearch"
],
"markdownDescription": "`String` It allows you to define the user id which will be used to record the Appbase.io analytics.",
"markdownDescription": "`String` It allows you to define the user id which will be used to record the ReactiveSearch.io analytics.",
"title": "userId",
"type": "string"
}
Expand Down

0 comments on commit ba3457b

Please sign in to comment.