Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/search/pages/create-custom-analyzer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Remove a token filter from your custom analyzer by clicking the *x* next to a li

== Next Steps

After you create a custom analyzer, you can xref:create-search-index-ui.adoc#default-analyzer[set it as the default analyzer] for your Search index.
After you create a custom analyzer, you can xref:set-advanced-settings.adoc#default-analyzer[set it as the default analyzer] for your Search index.

You can also use the custom analyzer when you create a type mapping or mapping while you xref:create-search-index-ui.adoc[].

Expand Down
2 changes: 1 addition & 1 deletion modules/search/pages/create-custom-date-time-parser.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For more information, see the documentation about the https://pkg.go.dev/time#pk

== Next Steps

After you create a custom date/time parser, you can xref:create-search-index-ui.adoc#date-time[set it as the default date/time parser] for your Search index.
After you create a custom date/time parser, you can xref:set-advanced-settings.adoc#date-time[set it as the default date/time parser] for your Search index.

To continue customizing your Search index, you can also:

Expand Down
21 changes: 2 additions & 19 deletions modules/search/pages/create-search-index-ui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
:page-topic-type: guide
:page-ui-name: {ui-name}
:page-product-name: {product-name}
:page-aliases: create-quick-index.adoc, set-advanced-settings.adoc
:page-aliases: create-quick-index.adoc
:description: You can create a Search index using the Couchbase {page-ui-name} to generate a properly formatted Search index definition.
:page-toclevels: 3

[abstract]
{description}

Use Advanced Mode to create a Search index in the Couchbase {page-ui-name} with full customization and advanced features, such as xref:create-custom-analyzer.adoc[creating custom analyzers] or xref:set-type-identifier.adoc[setting a document filter].

You must create a Search index before you can xref:simple-search-ui.adoc[run a search] with the Search Service.

== Prerequisites
Expand Down Expand Up @@ -49,27 +47,12 @@ If you select specific collections, you can only use documents from these collec
. Click *Index everything from: $COLLECTION_NAME*.
. Click btn:[Index All Fields].
. Click btn:[Add to Index].
. (Optional) <<configure-settings,>>.
. (Optional) xref:set-advanced-settings.adoc[Choose to add and configure advanced settings on your Search index].
. (Optional) Expand *Replicas & Partitions* and configure your *Number of Replicas* and *Number of Partitions*.
+
For more information, see xref:customize-index.adoc#replica[Replica and Partition Settings].
. Click btn:[Create Index].

[#configure-settings]
=== Configure Additional Search Index Settings

To configure additional settings for your Search index:

. [[default-analyzer]]In the *Default Analyzer* list, select the xref:customize-index.adoc#analyzers[default analyzer] to assign to new xref:customize-index.adoc#type-mappings[type mappings] in your index.
. [[date-time]]In the *Default Date/Time Parser* list, select the xref:customize-index.adoc#date-time[default date/time parser] to use for date data in your index.
+
TIP: If you're editing your index in xref:create-search-indexes.adoc#advanced-mode[Advanced Mode Editing], you can also choose to xref:create-custom-analyzer.adoc[] or xref:create-custom-date-time-parser.adoc[].
. (Advanced Mode Only) Under *Document Filter*, xref:set-type-identifier.adoc[configure a document filter] for your Search index.
. (Advanced Mode Only) Under *Scoring Model*, choose the scoring model to use for your Search index.
For more information, see xref:run-searches.adoc#scoring[Scoring for Search Queries] or xref:customize-index.adoc#scoring-model[Scoring Model].
+
TIP: If you choose the `bm25` scoring model, make sure to include the xref:search-request-params.adoc#global_scoring[`global_scoring`] property in Search queries for this index.

== Next Steps

Your Search index will contain documents that match the collection type mapping you specified.
Expand Down
119 changes: 96 additions & 23 deletions modules/search/pages/customize-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,47 @@ Some features are only available in xref:create-search-indexes.adoc#advanced-mod

You can add the following components and configure the following options for a Search index:

* <<analyzers,>>
* <<date-time,>>
* <<type-identifiers,>>
* <<scoring-model,>>
* <<type-mappings,>>
* <<synonyms,>>
* <<replica,>>
* <<custom-filters,>>
[cols="2,1,1"]
|====
|Option |Quick Mode |Advanced Mode

|<<analyzers,>>
|&check;
|&check;

|<<date-time,>>
|
|&check;

|<<type-identifiers,>>
|
|&check;

|<<synonyms,>>
|
|&check;

|<<scoring-model,>>
|
|&check;

|<<dynamic-fields,>>
|
|&check;

|<<type-mappings,>>
|&check;
|&check;

|<<replica,>>
|&check;
|&check;

|<<custom-filters,>>
|
|&check;

|====


[#analyzers]
Expand All @@ -29,7 +62,7 @@ Use analyzers to improve and customize the search results in your index.
Analyzers transform input text into tokens, which give you greater control over your index's text matching.
The *Default Analyzer* sets the analyzer that's used by default for new <<type-mappings,type mappings>> across your Search index.

You can use one of Couchbase's built-in analyzers as the *Default Analyzer* or the analyzer for a specific <<type-mappings,type mapping>>.
You can use 1 of Couchbase's built-in analyzers as the *Default Analyzer* or the analyzer for a specific <<type-mappings,type mapping>>.
If you use Advanced Mode, you can create your own analyzer.

Analyzers have different components that control how text is transformed for search.
Expand Down Expand Up @@ -79,6 +112,58 @@ If a collection mapping has a document filter, only documents that pass the filt

For more information about how to create a document filter, see xref:set-type-identifier.adoc[].

[#synonyms]
== Synonym Sources

[.status]#Couchbase Server 8.0#

As of Couchbase Server version 8.0 and later, you can add a Synonym Source to a Search index to use synonym searches on text fields.

After you xref:synonyms/create-synonym-collection-docs.adoc[create a synonym collection and synonym documents], and xref:synonyms/add-synonym-source.adoc[add a synonym source], you can run a search for a term and return results that include terms with similar meanings.

For example, you could run a search for `happy` and get results for `joyful`, `cheerful`, or `delighted`.

For more information about synonym search for the Search Service, see xref:synonyms/synonyms-search.adoc[].

[#scoring-model]
== Scoring Model

[.status]#Couchbase Server version 8.0#

As of Couchbase Server version 8.0, in Advanced Mode editing, you can choose the specific scoring model you want to use for a Search index.
Your scoring model changes the calculation the Search Service uses for scoring documents and ranking them in your search results.

The following scoring model algorithms are available:

* `tfidf`: The standard scoring model for the Search Service.
A higher tf-idf score for a document places that document higher in your search results.
* `bm25`: A scoring model better suited to hybrid searches with the Search Service.
A hybrid Search query uses xref:vector-search:vector-search.adoc[Vector Search] together with a standard Search query.
For more information about the calculations for scoring for each algorithm, see xref:run-searches.adoc#scoring[Scoring for Search Queries].

[#dynamic-fields]
== Dynamic Fields Settings

When you add <<dynamic,>> to your Search index, in *Advanced Mode*, you can choose how the Search Service handles these dynamic type mappings:

* <<store-dynamic,>>
* <<index-dynamic,>>

[#store-dynamic]
=== Store Dynamic Fields

If you turn on *Store Dynamic Fields*, the Search Service stores the content of any fields under a dynamic type mapping.
Storing field content allows you to return the value of a field in search results.

This increases the size of your index.

[#index-dynamic]
=== Index Dynamic Fields

If you turn on *Index Dynamic Fields*, the Search Service includes fields or whole documents in your Search index that match a dynamic type mapping.

This increases the size of your index.

[#type-mappings]
== Type Mappings and Mappings

Expand All @@ -98,7 +183,7 @@ For more information about how to configure settings for the different types of

For more information about how to configure a type mapping in the Search index editor, see xref:create-type-mapping.adoc[].

You can create two types of type mappings with the Search Service:
You can create 2 types of type mappings with the Search Service:

* <<dynamic,Dynamic Type Mappings>>
* <<static,Static Type Mappings>>
Expand All @@ -119,18 +204,6 @@ For example, you could create a static type mapping to only include the contents

Configure this type of mapping by selecting a field in your document schema in the Search index editor when you xref:create-type-mapping.adoc[].

[#synonyms]
== Synonym Sources

[.status]#Couchbase Server 8.0#

As of Couchbase Server version 8.0 and later, you can add a Synonym Source to a Search index to use synonym searches on text fields.

After you xref:synonyms/create-synonym-collection-docs.adoc[create a synonym collection and synonym documents], and xref:synonyms/add-synonym-source.adoc[add a synonym source], you can run a search for a term and return results that include terms with similar meanings.

For example, you could run a search for `happy` and get results for `joyful`, `cheerful`, or `delighted`.

For more information about synonym search for the Search Service, see xref:synonyms/synonyms-search.adoc[].

[#replica]
== Replica and Partition Settings
Expand All @@ -154,7 +227,7 @@ Partitions improve Search index performance, but increase the complexity of a Se
It's recommended to set your Search index partitions to the number of nodes running the Search Service in your operational cluster, to get the most efficient resource usage.

[#custom-filters]
== Custom Analyzers and Other Filters
== Custom Analyzers and Custom Filters

Custom filters are components of a Search index <<analyzers,analyzer>>.

Expand Down
2 changes: 1 addition & 1 deletion modules/search/pages/default-analyzers-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following default analyzer options are available:
|Analyzer |Description

| inherit
| If you set an analyzer to `inherit`, the Search index component inherits the xref:create-search-index-ui.adoc#default-analyzer[default analyzer set for an index].
| If you set an analyzer to `inherit`, the Search index component inherits the xref:set-advanced-settings.adoc#default-analyzer[default analyzer set for an index].

| Arabic - ar
| An Arabic language analyzer.
Expand Down
59 changes: 59 additions & 0 deletions modules/search/pages/set-advanced-settings.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
= Set Search Index Advanced Settings
:page-topic-type: guide
:page-ui-name: {ui-name}
:page-product-name: {product-name}
:description: When using the Advanced Mode editor in Couchbase {page-ui-name}, you can configure additional advanced settings for your Search index.

[abstract]
{description}

Advanced Mode adds full customization and advanced features such as xref:create-custom-analyzer.adoc[creating custom analyzers] or xref:set-type-identifier.adoc[setting a document filter].
For more information about the different settings and features available in a Search index, see xref:customize-index.adoc[].

You must create a Search index before you can xref:simple-search-ui.adoc[run a search] with the Search Service.

== Prerequisites

* You have the Search Service enabled on a node in your operational cluster.
For more information about how to change Services on your operational cluster, see xref:cloud:clusters:modify-database.adoc[].

* You have a bucket with scopes and collections in your operational cluster.
For more information, see xref:cloud:clusters:data-service/manage-buckets.adoc[].

* You have created a basic Search index with the {page-ui-name}.
For more information, see xref:create-search-index-ui.adoc[].

* You have logged in to the Couchbase {page-ui-name}.

== Procedure

To set advanced settings for a Search index with the {page-ui-name}:

. On the *Operational Clusters* page, select the operational cluster where you created your Search index.
. Go to menu:Data Tools[Search].
. Click the name of the index where you want to configure advanced settings.
. Click btn:[Enable Advanced Mode].
. Do any of the following:
.. [[default-analyzer]]In the *Default Analyzer* list, select the xref:customize-index.adoc#analyzers[default analyzer] to assign to new xref:customize-index.adoc#type-mappings[type mappings] in your index.
+
You can also choose to xref:create-custom-analyzer.adoc[].
.. [[date-time]]In the *Default Date/Time Parser* list, select the xref:customize-index.adoc#date-time[default date/time parser] to use for date data in your index.
+
You can also choose to xref:create-custom-date-time-parser.adoc[].
.. Add a document filter to control how documents are included in your type mappings.
For more information, see xref:set-type-identifier.adoc[].
.. Add a synonym source to support synonym searches.
For more information, see xref:synonyms-search.adoc[].
.. Choose the scoring model you want to use with your Search index.
For more information about scoring models, see xref:customize-index.adoc#scoring-model[Scoring Model].
.. If you're using xref:customize-index.adoc#dynamic[dynamic type mappings], choose how to handle dynamic fields in your Search index:
... To store the content of any fields added to a Search index from a dynamic type mapping, turn on *Store Dynamic Fields*.
... To include fields or whole documents in your Search index that match a dynamic type mapping, turn on *Index Dynamic Fields*.
. Click btn:[Update Index].

== Next Steps

You can keep adding additional features to your Search index to improve performance and search results.
For more information, see xref:customize-index.adoc[].

For more information about how to run a search, see xref:simple-search-ui.adoc[].
1 change: 1 addition & 0 deletions modules/search/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**** xref:cloud:search:create-type-mapping.adoc[]
***** xref:cloud:search:type-mapping-options.adoc[]
**** xref:cloud:search:set-type-identifier.adoc[]
**** xref:cloud:search:set-advanced-settings.adoc[]
**** xref:cloud:search:create-custom-analyzer.adoc[]
***** xref:cloud:search:create-custom-character-filter.adoc[]
***** xref:cloud:search:create-custom-tokenizer.adoc[]
Expand Down