Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to python SDK page add Go and Java SDK pages and examples #154

Open
wants to merge 70 commits into
base: capella
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
d97bf28
[AV-68976] Adjust all UI-based search index creation topics to match …
sarahlwelton Jan 10, 2024
ff2e8d3
[AV-68976] Tweak explanation of mapping vs. type mapping
sarahlwelton Jan 11, 2024
1e35348
[AV-68976] More edits to description of mappings/type mappings.
sarahlwelton Jan 11, 2024
b24d410
[AV-69144] Updating code samples and Search Indexes overview to refle…
sarahlwelton Jan 11, 2024
2dab972
[AV-69145] Adding topic import-search-index.adoc
sarahlwelton Jan 11, 2024
5cd1b85
[AV-68976] Changing location of topics in nav.adoc
sarahlwelton Jan 12, 2024
b306aa0
Merge branch 'AV-68976-search-quick-editor' into AV-68571-vector-sear…
sarahlwelton Jan 12, 2024
5b5782c
Merge branch 'AV-69145-search-import-index' into AV-68571-vector-sear…
sarahlwelton Jan 12, 2024
69bf4e6
[AV-68962] First draft of vector search overview
sarahlwelton Jan 15, 2024
12d9510
[AV-68962] Adding more notes about vector search.
sarahlwelton Jan 17, 2024
6b38713
[AV-68962] Adding link to OpenAI documentation
sarahlwelton Jan 17, 2024
8226a07
[AV-68962] More language tweaks on overview
sarahlwelton Jan 18, 2024
54c89b7
[AV-68962] Another language tweak
sarahlwelton Jan 18, 2024
9938460
[AV-68966] Initial draft of create and run vector search index topics…
sarahlwelton Jan 19, 2024
eebd12b
[AV-68966] Fixing typo in include
sarahlwelton Jan 19, 2024
12aeac4
[AV-68571] Commenting out non-existent entry for now
sarahlwelton Jan 19, 2024
584c3ae
[AV-68962] Language tweak after discussion with SME
sarahlwelton Jan 31, 2024
b471251
Merge branch 'AV-68962-vector-search-overview' into AV-68571-vector-s…
sarahlwelton Jan 31, 2024
45b2925
[AV-68976] Making changes to reflect current UI, instead of Figma des…
sarahlwelton Feb 8, 2024
6b8c4f0
Merge branch 'AV-68976-search-quick-editor' into AV-68571-vector-sear…
sarahlwelton Feb 8, 2024
f4989ef
[AV-68962] Copying over changes from Server version.
sarahlwelton Feb 8, 2024
7d2b311
Merge branch 'AV-68962-vector-search-overview' into AV-68571-vector-s…
sarahlwelton Feb 8, 2024
469b5ee
[AV-68963] Adding new vector settings to child-field-options-reference
sarahlwelton Feb 8, 2024
832a275
[AV-68964] Adding changes for running a vector search with the REST A…
sarahlwelton Feb 8, 2024
2f7c652
[AV-68964] Adding changes for running a vector search with the UI, ba…
sarahlwelton Feb 8, 2024
8c40dfd
Merge branch 'AV-68964-run-vector-search-ui' of https://github.com/co…
sarahlwelton Feb 8, 2024
ddfcb32
[AV-68967] Language and link fixes to newer Search docs, plus adding …
sarahlwelton Feb 8, 2024
92d3f36
[AV-68967] Some more link and text cleanup - some things were too Ser…
sarahlwelton Feb 8, 2024
d41265e
[AV-68962] Adjusting note to link to relevant documentation and expla…
sarahlwelton Feb 9, 2024
27b4927
Merge branch 'AV-68962-vector-search-overview' into AV-68571-vector-s…
sarahlwelton Feb 9, 2024
eadf2ed
[AV-68976] Building out See Also section in customize-index
sarahlwelton Feb 9, 2024
51bbb11
Merge branch 'AV-68976-search-quick-editor' into AV-68571-vector-sear…
sarahlwelton Feb 9, 2024
db6b170
[AV-68966] Remove unnecessary "size" parameter
sarahlwelton Feb 9, 2024
6c28f4d
Merge branch 'AV-68966-vector-search-rest-api' into AV-68571-vector-s…
sarahlwelton Feb 9, 2024
b078b2e
[AV-68571] Correcting incorrect table parameter
sarahlwelton Feb 9, 2024
18b9a0a
[AV-68571] Removing unnecessary period in search.adoc
sarahlwelton Feb 9, 2024
5fd1e85
[AV-68962] Adding link to integrations page and removing comments
sarahlwelton Feb 15, 2024
c8b01f9
Merge branch 'capella' into AV-68571-vector-search-7-6-capella
sarahlwelton Feb 26, 2024
4597a38
[AV-68571] Consistency edits based on peer review
sarahlwelton Mar 1, 2024
7d7784b
Update modules/n1ql/pages/n1ql-language-reference/searchfun.adoc
sarahlwelton Mar 1, 2024
fd709fa
Update modules/vector-search/pages/vector-search.adoc
sarahlwelton Mar 1, 2024
17d6327
[AV-68571] Cleaning up some comments from peer review
sarahlwelton Mar 1, 2024
caef2da
Merge branch 'AV-68571-vector-search-7-6-capella' of https://github.c…
sarahlwelton Mar 1, 2024
6a15a89
[AV-68571] Undoing a mistaken change.
sarahlwelton Mar 1, 2024
6527900
[AV-68571] Applying some changes that came in through peer review.
sarahlwelton Mar 1, 2024
c8d6de5
[AV-68571] Another correction from peer review comments
sarahlwelton Mar 1, 2024
ca92342
[AV-68571] Adding a tip to make the connection between Vector Search …
sarahlwelton Mar 1, 2024
e0d6c47
[AV-68571] Applying more suggestions from peer review
sarahlwelton Mar 5, 2024
c99b4f2
[AV-68571] Feedback from SME review
sarahlwelton Mar 8, 2024
17637f4
[AV-68571] More updates from SME review
sarahlwelton Mar 11, 2024
228be7e
[AV-68571] More SME review updates - adding procedure for running a v…
sarahlwelton Mar 12, 2024
b05de77
[AV-68571] Copying some changes over for consistency.
sarahlwelton Mar 12, 2024
796cae3
[AV-68571] Quick consistency edit.
sarahlwelton Mar 12, 2024
12ee944
[AV-68571] Consistency edits and incorporating comments from another SME
sarahlwelton Mar 12, 2024
d1e683d
[AV-68571] Adding clarification based on MB-60141
sarahlwelton Mar 12, 2024
36d7aaa
[AV-68571] Big consistency pass in tandem with branch on Server to cl…
sarahlwelton Mar 13, 2024
f1f7718
[AV-68965] Updating integrations page for LangChain
sarahlwelton Mar 13, 2024
1228c03
[AV-68571] Adding caution to all vector search creation pages based o…
sarahlwelton Mar 13, 2024
abdde93
[AV-68571] Adding attributes to handle product and UI names to future…
sarahlwelton Mar 14, 2024
6594a51
[AV-68571] May -> Can, per peer review
sarahlwelton Mar 14, 2024
c415b1d
[AV-68571] Updating integrations.adoc
sarahlwelton Mar 14, 2024
972ff55
[AV-68571] Fixing broken links, adding missing file.
sarahlwelton Mar 14, 2024
9c960ca
[AV-68571] Changing integrations.adoc into a partial to pull in from …
sarahlwelton Mar 14, 2024
59f37fe
need missing command
jon-strabala Mar 14, 2024
3944c0c
New Go SDK page
jon-strabala Mar 14, 2024
09117cb
Go SDK examples
jon-strabala Mar 14, 2024
04d77bf
Java SDK examples
jon-strabala Mar 14, 2024
6e1e127
Create run-vector-search-from-java-sdk.adoc
jon-strabala Mar 14, 2024
14839a2
add directions on how to get the description back
jon-strabala Mar 14, 2024
df7889f
Add nave for go and java SDKs
jon-strabala Mar 14, 2024
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
6 changes: 5 additions & 1 deletion antora.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
name: cloud
version: ~
version: ~
asciidoc:
attributes:
ui-name: Capella UI
product-name: Capella
147 changes: 98 additions & 49 deletions modules/n1ql/pages/n1ql-language-reference/searchfun.adoc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/search/examples/create-search-index-header.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
curl -s -XPUT -H "Content-Type: application/json" \
-u $CB_USERNAME:$CB_PASSWORD http://$CB_HOSTNAME:8094/api/index/landmark-content-index
-u ${CB_USERNAME}:${CB_PASSWORD} https://${CB_HOSTNAME}:18094/api/bucket/travel-sample/scope/inventory/index/landmark-content-index
-d \
2 changes: 1 addition & 1 deletion modules/search/examples/create-search-index-payload.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
curl -s -XPUT -H "Content-Type: application/json" \
-u $CB_USERNAME:$CB_PASSWORD http://$CB_HOSTNAME:8094/api/index/landmark-content-index
-u ${CB_USERNAME}:${CB_PASSWORD} https://${CB_HOSTNAME}:18094/api/bucket/travel-sample/scope/inventory/index/landmark-content-index
-d \
'{
"type": "fulltext-index",
Expand Down
12 changes: 6 additions & 6 deletions modules/search/examples/query-geojson.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"field": "geojson",
"geometry": {
"shape": {
"type": "point",
"type": "Point",
"coordinates": [0.47482593026924746, 51.31232878073189]
},
"relation": "intersects"
Expand All @@ -18,7 +18,7 @@
"field": "geojson",
"geometry": {
"shape": {
"type": "linestring",
"type": "LineString",
"coordinates": [
[-2.753735609842721, 53.94860827535115],
[-2.599898256093695,53.65007434185782]
Expand Down Expand Up @@ -138,17 +138,17 @@
"field": "geojson",
"geometry": {
"shape": {
"type": "geometrycollection",
"type": "GeometryCollection",
"geometries": [
{
"type": "linestring",
"type": "LineString",
"coordinates": [
[-2.753735609842721, 53.94860827535115],
[-2.599898256093695, 53.65007434185782]
]
},
{
"type": "multipolygon",
"type": "MultiPolygon",
"coordinates": [
[[
[-1.8167959002718135, 53.8626654046235],
Expand Down Expand Up @@ -183,7 +183,7 @@
"geometry": {
"shape": {
"coordinates": [-2.2450285424707204, 53.48503270828377],
"type": "circle",
"type": "Circle",
"radius": "100mi"
},
"relation": "within"
Expand Down
14 changes: 14 additions & 0 deletions modules/search/examples/query-ip-range.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"query": {
"conjuncts": [
{
"cidr": "2.7.13.0/24",
"field": "ipv4"
},
{
"cidr": "2001:db8:1234:5678::/119",
"field": "ipv6"
}
]
}
}
10 changes: 9 additions & 1 deletion modules/search/examples/run-search-full-request.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@
}
},
// end::query[]

// tag::knn[]
"knn": [
{
"k": 10,
"field": "vector_field",
"vector": [ 0.707106781186548, 0, 0.707106781186548 ]
}
],
// end::knn[]
// tag::ctl[]
"ctl": {
"timeout": 10000,
Expand Down
2 changes: 1 addition & 1 deletion modules/search/examples/run-search-header.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
curl -s -XPUT -H "Content-Type: application/json" \
-u $CB_USERNAME:$CB_PASSWORD http://$CB_HOSTNAME:8094/api/index/$INDEX-NAME/query -d \
-u ${CB_USERNAME}:${CB_PASSWORD} https://${CB_HOSTNAME}:18094/api/bucket/${BUCKET-NAME}/scope/${SCOPE-NAME}/index/${INDEX-NAME}/query -d \
2 changes: 1 addition & 1 deletion modules/search/examples/run-search-payload.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
curl -XPOST -H "Content-Type: application/json" \
-u $CB_USERNAME:$CB_PASSWORD http://$CB_HOSTNAME:8094/api/index/landmark-content-index/query \
-u ${CB_USERNAME}:${CB_PASSWORD} https://${CB_HOSTNAME}:18094/api/bucket/travel-sample/scope/inventory/index/landmark-content-index/query \
-d '{
"explain": true,
"fields": [
Expand Down
102 changes: 102 additions & 0 deletions modules/search/pages/child-field-options-reference.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
= Child Field Options
:page-topic-type: reference
:page-ui-name: {ui-name}
:page-product-name: {product-name}
:description: You can configure a child field from the Couchbase {page-ui-name}'s Advanced Mode to control how its data is added to your Search index.

[abstract]
{description}

For more information about how to create a child field using Advanced Mode, see xref:create-child-field.adoc[].

For more information about creating an index and child fields in Quick Mode, see xref:create-quick-index.adoc[].

You can configure the following options for a child field in Advanced Mode, based on its type:


|====
|Option |Description

|Dimension (Vector Fields Only) a|

include::partial$vector-search-field-descriptions.adoc[tag=dimension]

|Similarity Metric (Vector Fields Only) a|

include::partial$vector-search-field-descriptions.adoc[tag=similarity_metric]

|Optimized For (Vector Fields Only) a|

include::partial$vector-search-field-descriptions.adoc[tag=optimized_for]

|Searchable As a|

Set a different name that you can use to search the field's contents in a query.

The default value is the value set in the *Field* field when you xref:create-child-field.adoc#field[create a child field].

|Analyzer a|

Choose an analyzer for the content in the child field.

You can choose a default analyzer or a custom analyzer.

For more information about the available default analyzers, see xref:default-analyzers-reference.adoc[].

For more information about how to create a custom analyzer, see xref:create-custom-analyzer.adoc[].

|Index a|

To include the child field in the index, select *Index*.

To remove the child field from the index, clear *Index*.

If you remove the child field from the index, it cannot appear in search results.

|[[store]]Store a|

To store the values from the field in the index and return them in search results, select *Store*.
This increases your index's size and indexing time.

To remove the field's values from the index, clear *Store*.

|Include in _all field a|

The `_all` field is a composite field that has the content from multiple fields in an index.
It allows searches to query the content of a field without specifying the field's name.

To include this field in the `_all` field, select *Include in _all field*.

To exclude this field from the `_all` field, clear *Include in _all field*.

TIP: To change the name of the `_all` field, see xref:set-advanced-settings.adoc#all-field[Default Field].

|[[term-vectors]]Include Term Vectors a|

Term vectors store the location of terms in a field for an index.
You can use term vectors to xref:search-request-params.adoc#highlight[highlight matching search terms in search results], and xref:search-request-params.adoc#match_phrase[perform phrase searches].
Term vectors increase your index's size and indexing time.

To enable term vectors for this field, select *Include Term Vectors*.

To turn off term vectors, clear *Include Term Vectors*.

NOTE: To enable term vectors, you must also enable <<store,Store>>.

|Doc Values a|

Use doc values for a field for Search xref:search-request-params.adoc#facets[Facets] and sorting your search results.

To store doc values and enable faceting and sorting for this field, select *Doc Values*.

To exclude doc values from the index for this field, clear *Doc Values*.
|====

== See Also

* xref:create-child-field.adoc[]
* xref:create-search-index-ui.adoc[]
* xref:vector-search:create-vector-search-index-ui.adoc[]
* xref:set-type-identifier.adoc[]
* xref:create-type-mapping.adoc[]
* xref:set-advanced-settings.adoc[]
86 changes: 15 additions & 71 deletions modules/search/pages/create-child-field.adoc
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
= Create a Child Field
= Create a Child Field in Advanced Mode
:page-topic-type: guide
:description: Create a child field with the Couchbase Capella UI to add or remove a specific field's content from a Search index.
:page-ui-name: {ui-name}
:page-product-name: {product-name}
:description: Create a child field with the Couchbase {page-ui-name}'s Advanced Mode to add or remove a specific field's content from a Search index.

[abstract]
{description}

== Prerequisites

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

* You have created an index.
For more information, see xref:create-search-index-ui.adoc[].

* You've created a type mapping.
* You have created a type mapping.
For more information about how to create a type mapping on an index, see xref:create-type-mapping.adoc[].

* You've logged in to the Couchbase Capella UI.
* You have logged in to the Couchbase {page-ui-name}.

* You have started to create or already created an index in xref:create-search-index-ui.adoc[Advanced Mode].

== Procedure

To add or remove a child field from a Search index with the Capella UI:
To add or remove a child field from a Search index with the {page-ui-name}:

. On the *Databases* page, select the database that has the Search index you want to edit.
. Go to menu:Data Tools[Search].
Expand All @@ -30,72 +37,9 @@ NOTE: The field must contain either a single value or an array. If the field con
+
For more information about the available data types, see xref:field-data-types-reference.adoc[].

. Configure optional settings for the child field:
. Configure optional settings for the child field.
+
|====
|Option |Description

|Searchable As a|

Set a different name that you can use to search the field's contents in a query.

The default value is the value set in *Field*.

|Analyzer a|

Choose an analyzer for the content in the child field.

You can choose a default analyzer or a custom analyzer.

For more information about the available default analyzers, see xref:default-analyzers-reference.adoc[].

For more information about how to create a custom analyzer, see xref:create-custom-analyzer.adoc[].

|Index a|

To include the child field in the index, select *Index*.

To remove the child field from the index, clear *Index*.

|[[store]]Store a|

To store the values from the field in the index and return them in search results, select *Store*.
This increases your index's size and indexing time.

To remove the field's values from the index, clear *Store*.

|Include in _all field a|

The `_all` field is a composite field that has the content from multiple fields in an index.
It allows searches to query the content of a field without specifying the field's name.

To include this field in the `_all` field, select *Include in _all field*.

To exclude this field from the `_all` field, clear *Include in _all field*.

TIP: To change the name of the `_all` field, see xref:set-advanced-settings.adoc#all-field[Default Field].

|[[term-vectors]]Include Term Vectors a|

Term vectors store the location of terms in a field for an index.
You can use term vectors to highlighting matching search terms in search results, and perform phrase searches.
Term vectors increase your index's size and indexing time.

To enable term vectors for this field, select *Include Term Vectors*.

To turn off term vectors, clear *Include Term Vectors*.

NOTE: To enable term vectors, you must also enable <<store,Store>>.

|Doc Values a|

Doc values are the value for each instance of the field in an index.
Use doc values for Search xref:search-request-params.adoc#facets[Facets] and sorting search results.

To store doc values, select *Doc Values*.

To exclude doc values from the index, clear *Doc Values*.
|====
For more information about the available settings for child fields, see xref:child-field-options-reference.adoc[].
. Click btn:[Submit].
. Click btn:[Update Index].

Expand Down
19 changes: 13 additions & 6 deletions modules/search/pages/create-child-mapping.adoc
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
= Create a Child Mapping
= Create a Child Mapping in Advanced Mode
:page-topic-type: guide
:description: Create a child mapping with the Couchbase Capella UI to add or remove a field that contains a JSON object from a Search index.
:page-ui-name: {ui-name}
:page-product-name: {product-name}
:description: Create a child mapping with the Couchbase {page-ui-name}'s Advanced Mode to add or remove a field that contains a JSON object from a Search index.

[abstract]
{description}

== Prerequisites

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

* You have created an index.
For more information, see xref:create-search-index-ui.adoc[].

* You've created a type mapping.
* You have created a type mapping.
For more information about how to create a type mapping on an index, see xref:create-type-mapping.adoc[].

* You've logged in to the Couchbase Capella UI.
* You have logged in to the Couchbase {page-ui-name}.

* You have started to create or already created an index in xref:create-search-index-ui.adoc[Advanced Mode].

== Procedure

To create a child mapping with the Capella UI:
To create a child mapping with the {page-ui-name}:

. On the *Databases* page, select the database that has the Search index you want to edit.
. Go to menu:Data Tools[Search].
Expand Down
Loading