diff --git a/modules/search/examples/simple-search-index-payload.jsonc b/modules/search/examples/simple-search-index-payload.jsonc index aa5037fb2..6f3213d5f 100644 --- a/modules/search/examples/simple-search-index-payload.jsonc +++ b/modules/search/examples/simple-search-index-payload.jsonc @@ -20,8 +20,78 @@ "doc_config": { "docid_prefix_delim": "", "docid_regexp": "", - "mode": "scope.collection.type_field", - "type_field": "type" + "mode": "scope.collection.custom", + "type_field": "type", + // tag::doc_filter[] + "doc_filter": { + // tag::boolean_filter[] + "free_breakfast_true": { + "bool": true, + "field": "free_breakfast", + "order": 1 + }, + // end::boolean_filter[] + // tag::date_range_filter[] + "review_date_range": { + "start": "2015-01-01", + "end": "2019-01-01", + "inclusive_end": true, + "inclusive_start": false, + "field": "reviews.date", + "order": 2, + "datetime_parser": "My_Date_Time_Parser" + }, + // end::date_range_filter[] + // tag::numeric_range_filter[] + "cleanliness_range": { + "min": 3, + "max": 5, + "inclusive_min": true, + "inclusive_max": true, + "field": "reviews.ratings.Cleanliness", + "order": 3 + }, + // end::numeric_range_filter[] + // tag::conjunct_filter[] + "free_parking_AND_vacancy": { + "conjuncts": [ + { + "bool": true, + "field": "vacancy" + }, + { + "bool": true, + "field": "free_parking" + } + ], + "order": 4 + }, + // end::conjunct_filter[] + // tag::disjunct_filter[] + "location_OR_service": { + "disjuncts": [ + { + "min": 5, + "field": "reviews.ratings.Service" + }, + { + "min": 5, + "field": "reviews.ratings.Location" + } + ], + "order": 6 + }, + // end::disjunct_filter[] + // tag::term_filter[] + "name_hotel": { + "term": "Hotel", + "order": 5, + "field": "name" + } + // end::term_filter[] + + } + // end::doc_filter[] }, // end::doc_config[] // tag::mapping[] @@ -178,6 +248,26 @@ "type": "text" } ] + }, + "inventory.hotel.free_breakfast_true": { + "dynamic": true, + "enabled": true, + "properties": { + "free_breakfast": { + "dynamic": false, + "enabled": true, + "fields": [ + { + "docvalues": true, + "include_in_all": true, + "index": true, + "name": "free_breakfast", + "store": true, + "type": "boolean" + } + ] + } + } } } } diff --git a/modules/search/pages/create-type-mapping.adoc b/modules/search/pages/create-type-mapping.adoc index 20a04a46b..0b63efed5 100644 --- a/modules/search/pages/create-type-mapping.adoc +++ b/modules/search/pages/create-type-mapping.adoc @@ -55,6 +55,14 @@ To add an entire collection as a new type mapping: . xref:type-mapping-options.adoc#collection[Configure your type mapping options]. . Click btn:[Add To Index]. +[#filter-mapping] +==== Add a Document Filter to a Collection Type Mapping + +You can add a xref:customize-index.adoc#type-identifiers[document filter] to any collection type mapping on your Search index. +A document filter adds or removes documents from a collection type mapping in your Search index. + +To add a document filter to a mapping, see xref:set-type-identifier.adoc[]. + [#xattrs] === Add an XATTRs Mapping diff --git a/modules/search/pages/customize-index.adoc b/modules/search/pages/customize-index.adoc index 659733056..7a71304dd 100644 --- a/modules/search/pages/customize-index.adoc +++ b/modules/search/pages/customize-index.adoc @@ -53,20 +53,27 @@ In Advanced Mode, you can also choose and configure an additional document filte * *JSON Type Field*: Selects only documents that contain a specific field with a specified string value. * *Doc ID up to Separator*: Selects only documents with an ID or key up to a specific substring. * *Doc ID with Regex*: Selects only documents with an ID or key that matches a regular expression. +* [.status]#Couchbase Server 8.0# *Custom*: As of Couchbase Server version 8.0, custom document filters select only documents that match a custom filter, based on the values of specific fields. -For more information about how to configure a document filter, see xref:set-type-identifier.adoc[]. +Document filters add a more granular filter to the documents in a collection <>. +If a collection mapping has a document filter, only documents that pass the filter can be included in the Search index under that collection. + +For more information about how to create a document filter, see xref:set-type-identifier.adoc[]. [#type-mappings] == Type Mappings and Mappings Use a type mapping to include or exclude specific documents in a collection from an index. -Type mappings can also set a field's data type and other settings. +Type mappings can also set a document field's data type and other settings. Type mappings start at the collection level. Create additional mappings for document fields or JSON objects under a collection's type mapping to restrict the documents added to your index. This can improve Search index performance over indexing entire collections. +For a type mapping defined on a scope and collection, you can create an additional <> to restrict the documents added under that type mapping. +Only documents from your specified scope and collection that also pass the document filter can be included in your Search index, and potentially returned in search results. + If your operational cluster is running Couchbase Server version 7.6.2 and later, you can also choose to include document metadata inside your Search index by creating an XATTRs mapping. For more information about how to configure settings for the different types of mappings and type mappings, see xref:type-mapping-options.adoc[]. diff --git a/modules/search/pages/search-index-params.adoc b/modules/search/pages/search-index-params.adoc index 86decc5ac..6f41d9422 100644 --- a/modules/search/pages/search-index-params.adoc +++ b/modules/search/pages/search-index-params.adoc @@ -191,13 +191,15 @@ The `doc_config` object is a child object of the <>. It contains the fo |mode |String |Yes a| -Set a xref:customize-index.adoc#type-identifiers[type identifier] for the Search index to filter documents from search results: +Set a xref:customize-index.adoc#type-identifiers[type identifier] for the Search index to filter documents. +Set the mode for your type identifier by setting this property to `"scope.collection.\{mode\}"` +You can choose from one of the following mode values: * `type_field`: Use the value from a specific field in the documents. * `docid_prefix_delim`: Use the leading characters in the documents' ID values, up to but not including a specified separator. * `docid_regexp`: Use a regular expression on the documents' ID values. - -NOTE: If you want your Search index to only include documents from a specific collection, the `mode` value must be `"scope.collection.\{mode\}"`. +* `custom`: Use a custom document filter expression to filter documents based on specific values. +See <>. |docid_prefix_delim |String |Yes a| @@ -205,18 +207,396 @@ If `mode` is `docid_prefix_delim`, set the separator character to use on a docum For example, to filter documents based on the characters before a `\_` in their ID values, set `docid_prefix_delim` to `_`. +To use this filter later, you need to modify the name of the type mapping where you want to use the filter. + +For example, you could set a specific filter value of `hotel` on a type mapping. +If `docid_prefix_delim` is set to `\_`, a document would have to have the string `hotel` before the character `_` in its ID value to pass the filter. +To use the filter, set the <> name to `\{scope\}.\{collection\}.hotel`. +If the document passes the filter, it's included in the type mapping, and your Search index. + |docid_regexp |String |Yes a| If `mode` is `docid_regexp`, set the regular expression to use on a document's ID value to determine its type. For example, to filter documents that contain the characters `\_40` in their ID value, set `docid_regexp` to `_[3-5]0`. +To use this filter later, you need to modify the name of the type mapping where you want to use the filter. + +For example, you could set a specific filter value of `_40` on a type mapping. +A document with the characters `_40` in its ID value would pass the filter. +To use the filter, set the <> name to `\{scope\}.\{collection\}._40`. +If the document passes the filter, it's included in the type mapping, and your Search index. + |type_field |String |Yes a| If `mode` is `type_field`, set the name of the field to use to filter documents. For example, to filter documents based on the value of their `type` field, set `type_field` to `type`. +To use this filter later, you need to modify the name of the type mapping where you want to use the filter. + +For example, you could use a field called `type` as your `type_field`. +To use the filter, set your <> name to `\{scope\}.\{collection\}.landmark`. +With `type` as the `type_field` and `landmark` as the configured filter, a document would have to have `landmark` in its `type` field to pass the filter. + +|[[doc_filter]]doc_filter |Object |Yes a| + +[.status]#Couchbase Server 8.0# + +If `mode` is `custom`, provide an object that sets a custom document filter for a scope and collection in your Search index. + +You can filter documents with custom filters based on the value of: + +* <>. +* <>. +* <>. +* <>. +* A <> or <> object that combines 2 or more of the available filters. +You can add up to a maximum of 100 document filters on a single Search index. + +For more information about how to define each type of filter in your Search index definition, see <>. + +|==== + +[#doc_filter_obj] +==== Doc_filter Object + +[.status]#Couchbase Server 8.0# + +The `doc_filter` object contains JSON objects for each document filter you want to apply to a type mapping in your Search index: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=doc_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +You can add up to a maximum of 100 document filters on a single Search index. + +You can define the following types of document filters: + +* <> +* <> +* <> +* <> +* <> +* <> + +[#boolean_filter] +===== Boolean Document Filters + +[.status]#Couchbase Server 8.0# + +A boolean document filter adds or removes documents from a type mapping based on the value of a boolean field: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=boolean_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your boolean document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.free_breakfast_true`. + +A boolean document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|bool |Boolean |Yes a| + +Set `bool` to the value a document must have in your chosen boolean field for a document to pass the filter. + +`bool` can be `true` or `false`. + +|field |String |Yes a| + +Enter the name of the field that contains a boolean value you want to use as a filter. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + +|==== + +[#date_range_filter] +===== Date Range Document Filters + +[.status]#Couchbase Server 8.0# + +A date range document filter adds or removes documents from a type mapping based on the value of a date field and a specified range: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=date_range_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your date range document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.review_date_range`. + +A date range document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|start |Date and Time String |No a| + +Set the start date for the range you want to use as a filter. +Dates occurring before your `start` value do not pass the filter. + +You can choose to set only a `start` value or only an `end` value for the filter. + +By default, the value for `start` is included in your date range filter. + +|end |Date and Time String |No a| + +Set the end date for the range you want to use as a filter. +Dates occurring after your `end` value do not pass the filter. + +You can choose to set only a `start` value or only an `end` value for the filter. + +By default, the value for `end` is excluded from your date range filter. + +|inclusive_start |Boolean |No a| + +Set whether the value of `start` should be included or excluded from the range: + +* If `inclusive_start` is `true`, documents with the same date and time string as `start` pass the filter. +* If `inclusive_start` is `false`, documents must have a date and time string that's later than the value of `start` to pass the filter. +If you do not set a value for `inclusive_start`, by default, `start` is inclusive to your date range. + +|inclusive_end |Boolean |No a| + +Set whether the value of `end` should be included or excluded from the range: + +* If `inclusive_end` is `true`, documents with the same date and time string as `end` pass the filter. +* If `inclusive_end` is `false`, documents must have a date and time string that's earlier than the value of `end` to pass the filter. +If you do not set a value for `inclusive_end`, by default, `end` is not included in your date range. + +|field |String |Yes a| + +Enter the name of the field that contains a date value you want to use as a filter. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + +|datetime_parser |String |No a| + +Enter the name of the date/time parser you want to use to interpret your date and time strings. + +You can use a xref:default-date-time-parsers-reference.adoc[default date/time parser] or reference a date/time parser from the <>. + +|==== + +[#numeric_range_filter] +===== Numeric Range Document Filters + +[.status]#Couchbase Server 8.0# + +A numeric range document filter adds or removes documents from a type mapping based on the value of a numeric field and a specified range: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=numeric_range_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your numeric range document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.cleanliness_range`. + +A numeric range document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|min |Number |No a| + +Set the minimum value for the range you want to use as a filter. +Values smaller than your `min` value do not pass the filter. + +You can choose to set only a `min` value or only a `max` value for the filter. + +By default, the value for `min` is included in your numeric range filter. + +|max |Number |No a| + +Set the maximum value for the range you want to use as a filter. +Values larger than your `max` value do not pass the filter. + +You can choose to set only a `min` value or only a `max` value for the filter. + +By default, the value for `max` is excluded from your numeric range filter. + +|inclusive_min |Boolean |No a| + +Set whether the value of `min` should be included or excluded from the range: + +* If `inclusive_min` is `true`, documents with the same value as `min` pass the filter. +* If `inclusive_min` is `false`, documents must have a value that's larger than the value of `min` to pass the filter. +If you do not set a value for `inclusive_min`, by default, `min` is inclusive to your numeric range. + +|inclusive_max |Boolean |No a| + +Set whether the value of `max` should be included or excluded from the range: + +* If `inclusive_max` is `true`, documents with the same value as `max` pass the filter. +* If `inclusive_max` is `false`, documents must have a value that's smaller than the value of `max` to pass the filter. +If you do not set a value for `inclusive_max`, by default, `max` is not included in your numeric range. + +|field |String |Yes a| + +Enter the name of the field that contains a numeric value you want to use as a filter. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + +|==== + +[#term_filter] +===== Term Document Filters + +[.status]#Couchbase Server 8.0# + +A term document filter adds or removes documents from a type mapping based on the existence of a term in a specified document field: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=term_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your term document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.name_hotel`. + +A term document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|term |String |Yes a| + +Enter a string that must exist inside `field` for a document to pass the filter. + +The string must be an exact match for a document to pass. + +|field |String |Yes a| + +Enter the name of the field where you want to search for the value of `term`. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + +|==== + +[#conjunct_filter] +===== Conjunct Document Filter + +[.status]#Couchbase Server 8.0# + +A conjunct document filter can contain any number of the other document filter types: + +* <> +* <> +* <> +* <> +* <> +* <> +A document must pass every filter inside the `conjuncts` array to pass a conjunct document filter and be included in a type mapping: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=conjunct_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your conjunct document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.free_parking_AND_vacancy`. + +A conjunct document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|conjuncts |Array of Objects |Yes a| + +Add an object to define each filter you want a document to pass before a document can be included in a type mapping. + +The `conjuncts` array can contain any other document filter type, including additional conjunct and disjunct document filters. +You cannot nest more than 5 conjunct or disjunct document filters inside a single filter. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + +|==== + +[#disjunct_filter] +===== Disjunct Document Filter + +[.status]#Couchbase Server 8.0# + +A disjunct document filter can contain any number of the other document filter types: + +* <> +* <> +* <> +* <> +* <> +* <> +A document must pass at least the number of filters you specify as `min` from the `disjuncts` array to pass the filter and be included in a type mapping: + +[source,json] +---- +include::example$simple-search-index-payload.jsonc[tag=disjunct_filter] +---- + +TIP: To view the entire JSON payload, click btn:[View]. + +Set the name of your disjunct document filter object to the name you want for your filter. +Use this name to use the filter on a <>. +For example, `\{scope\}.\{collection\}.location_OR_service`. + +A disjunct document filter can have the following properties: + +[cols="2,1,1,4"] +|==== +|Property |Type |Required? |Description + +|disjuncts |Array of Objects |Yes a| + +Add an object to define each filter you want to run against a document for this disjunct document filter. + +The `disjuncts` array can contain any other document filter type, including additional conjunct and disjunct document filters. +You cannot nest more than 5 conjunct or disjunct document filters inside a single filter. + +|min |Number |Yes a| + +Set `min` to the minimum number of filters from `disjuncts` that a document must pass to be included in a type mapping. + +|order |Number |Yes a| + +include::partial$order-doc-filter-description.adoc[] + |==== [#mapping] diff --git a/modules/search/pages/set-type-identifier.adoc b/modules/search/pages/set-type-identifier.adoc index e2e7c182e..b9b9732a0 100644 --- a/modules/search/pages/set-type-identifier.adoc +++ b/modules/search/pages/set-type-identifier.adoc @@ -8,6 +8,20 @@ [abstract] {description} +For example, if you added a filter to your type mapping that checked if the value of a field was `true`, only documents with the value `true` for that field would be included in your Search index under that type mapping. +Based on your settings, xref:create-type-mapping.adoc#field[child fields] or xref:create-type-mapping.adoc#object[child mappings] that you define for documents that pass the filter on this type mapping will be returned in search results. + +You can filter based on the value of a field, or part of the value of your document IDs. + +As of Couchbase Server version 8.0, you can filter documents with custom filters based on the value of: + +* xref:search-index-params.adoc#boolean_filter[A boolean field]. +* xref:search-index-params.adoc#date_range_filter[A date field, within a specific range]. +* xref:search-index-params.adoc#numeric_range_filter[A numeric field, within a specific range]. +* xref:search-index-params.adoc#term_filter[A term in a text field]. +* A xref:search-index-params.adoc#conjunct_filter[conjunct] or xref:search-index-params.adoc#disjunct_filter[disjunct] object that combines 2 or more of the available filters. +You can add up to a maximum of 100 custom document filters on a single Search index. + For more information about document filters and type mappings, see xref:customize-index.adoc#type-identifiers[Search Index Features]. == Prerequisites @@ -20,8 +34,8 @@ For more information, see xref:cloud:clusters:data-service/manage-buckets.adoc[] * You have started to create or already created an index in xref:create-search-indexes.adoc#advanced-mode[Advanced Mode Editing]. -* You have created at least one type mapping in your Search index. -For more information, see xref:create-search-index-ui.adoc[]. +* You have created at least 1 type mapping in your Search index. +For more information, see xref:create-type-mapping.adoc[]. * You have logged in to the Couchbase {page-ui-name}. @@ -31,15 +45,19 @@ To set a document filter for a Search index with the {page-ui-name}: . On the *Operational Clusters* page, select the operational cluster where you want to work with the Search Service. . Go to menu:Data Tools[Search]. -. Do one of the following: +. Do 1 of the following: .. To work with an existing Search index, click the name of the index where you want to create a document filter. .. To create a new Search index, click btn:[Create Search Index]. . Make sure to select *Enable Advanced Options*. . Expand *Global Index Settings*. -. Do one of the following: +. Do 1 of the following: .. <> .. <> .. <> +.. <> + +WARNING: You cannot use custom document filters with another type of type identifier on your Search index. +If you select an option other than *Custom* after you have defined custom document filters, you'll lose any defined custom filters on your Search index. [#json-type] === Create a JSON Type Field Document Filter @@ -51,12 +69,11 @@ To only add documents to your Search index that contain a specific field with a + For example, if your documents include a `type` field, you could enter `type` in the *JSON Type Field* field. + -NOTE: You cannot use a field as a document filter if the field name contains a period (.). -. Under *Type Mappings*, next to the type mapping where you want to add the document filter, go to menu:More Options (⋮)[Edit]. -. In the *Name* field, add a period (.) to the end of the current type mapping name. -. After the period, add the exact string from the document field that you want to use as a filter. +NOTE: You cannot use a field as a document filter if the field name contains a period (.). +. Under *Type Mappings*, next to the type mapping where you want to add the document filter, click btn:[Edit]. +. In the *Enter Document Filter* field, enter the exact string from the document field that you want to use as a filter. + -For example, if you wanted your Search index to only return documents that had a `type` value of `hotel`, you could enter `hotel`. +For example, if you wanted your type mapping to only include documents that had a value of `hotel` in the `type` field, you could enter `hotel` in the filter field. . Click btn:[Submit]. . Click btn:[Update Index]. @@ -69,11 +86,10 @@ To only add documents to your Search index that have IDs that match a specified . In the *Doc ID up to Separator* field, enter the separator character from the ID prefix in your document ID values. + For example, if you know all of your document ID values are prefixed by a string and an underscore (\_), enter `_`. -. Under *Type Mappings*, next to the type mapping where you want to add the document filter, go to menu:More Options (⋮)[Edit]. -. In the *Name* field, add a period (.) to the end of the current type mapping name. -. After the period, add the exact prefix from the document's ID value that you want to use as a filter. +. Under *Type Mappings*, next to the type mapping where you want to add the document filter, click btn:[Edit]. +. In the *Enter Document Filter* field, enter the exact prefix from the document's ID value that you want to use as a filter. + -For example, if you wanted your Search index to only return documents that have an prefix of `landmark_`, you could enter `landmark`. +For example, if you wanted your type mapping to only include documents that have an prefix of `landmark_` in their ID values, you could enter `landmark` in the filter field. . Click btn:[Submit]. . Click btn:[Update Index]. @@ -86,11 +102,42 @@ To only add documents to your Search index that have IDs that match a specified . In the *Doc ID with Regex* field, enter the regular expression that you want to use to filter documents in your Search index. + For example, if you wanted documents with ID values that contained `\_40`, you could enter `_[3-5]0` as your regular expression. -. Under *Type Mappings*, next to the type mapping where you want to add the document filter, go to menu:More Options (⋮)[Edit]. -. In the *Name* field, add a period (.) to the end of the current type mapping name. -. After the period, add a match for the regular expression from the document's ID value that you want to use as a filter. +. Under *Type Mappings*, next to the type mapping where you want to add the document filter, click btn:[Edit]. +. In the *Enter Document Filter* field, enter a match for the regular expression from the document's ID value that you want to use as a filter. ++ +For example, if you wanted your type mapping to only include documents with ID values that contained `_40`, you could enter `_40` in the filter field. +. Click btn:[Submit]. +. Click btn:[Update Index]. + +[#custom] +=== Create a Custom Document Filter + +[.status]#Couchbase Server 8.0# + +To create a new custom document filter on a Search index with the Couchbase {page-ui-name}: + +. Under *Choose Document Filter*, click btn:[Custom]. +. Click btn:[Add Document Filter]. +. In the *Label* field, enter a name for your new document filter. +. In the *Filter* code editor, enter a JSON object to define your document filter. ++ +For more information about the properties for each document filter type, see: ++ +* xref:search-index-params.adoc#boolean_filter[Boolean Document Filters] +* xref:search-index-params.adoc#date_range_filter[Date Range Document Filters] +* xref:search-index-params.adoc#numeric_range_filter[Numeric Range Document Filters] +* xref:search-index-params.adoc#term_filter[Term Document Filters] +* xref:search-index-params.adoc#conjunct_filter[Conjunct Document Filters] +* xref:search-index-params.adoc#disjunct_filter[Disjunct Document Filters] + ++ +TIP: Do not add the name of your document filter to your filter definition when defining a custom document filter through the {page-ui-name}. +Define the document filter as an unnamed object with the specific properties you need for your document filter type. + + -For example, if you wanted your Search index to only return documents with ID values that contained `_40`, you could enter `_40`. +. Click btn:[Save]. +. Under *Type Mappings*, next to the type mapping where you want to add the document filter, click btn:[Edit]. +. In the *Select Document Filter* list, select the name of the custom document filter that you want to use to filter documents on this type mapping. . Click btn:[Submit]. . Click btn:[Update Index]. diff --git a/modules/search/partials/order-doc-filter-description.adoc b/modules/search/partials/order-doc-filter-description.adoc new file mode 100644 index 000000000..3eb9cd3ec --- /dev/null +++ b/modules/search/partials/order-doc-filter-description.adoc @@ -0,0 +1,11 @@ +Set the filtering order for this document filter, compared to the other document filters in use on the Search index. + +The Search Service applies document filters on type mappings in the order you specify. +For example, if a document does not pass a type mapping filter where `"order": 1`, the Search Service checks the document against the filter with `"order": 2`. + +The Search Service continues checking documents against any filters defined on type mappings in your Search index until a document passes a filter, or there are no more defined type mapping filters. + +If a document does not pass any defined filters, it's not included in your Search index. + +TIP: If you're defining a document filter inside a `conjuncts` or `disjuncts` array, you do not need to include the `order` property for each filter object. +Add the `order` property to the `conjuncts` or `disjuncts` filter object, instead. \ No newline at end of file diff --git a/preview/HEAD.yml b/preview/HEAD.yml index 76edc982a..8d2d1d2da 100644 --- a/preview/HEAD.yml +++ b/preview/HEAD.yml @@ -3,4 +3,4 @@ sources: branches: [8-0-docs-uptake] override: site: - startPage: cloud:get-started:intro.adoc + startPage: cloud:get-started:intro.adoc \ No newline at end of file