From 85c5acf8a8976bd3d9a8314cbbedc1e7b859b343 Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Fri, 3 Jan 2025 12:40:38 +0200 Subject: [PATCH 1/4] fix typo in folder name --- .../alderaan_with_embedding.json | 0 .../beru-whitesun-lars_with_embedding.json | 0 .../bespin_with_embedding.json | 0 .../biggs-darklighter_with_embedding.json | 0 .../c-3po_with_embedding.json | 0 .../coruscant_with_embedding.json | 0 .../cr90-corvette_with_embedding.json | 0 .../dagobah_with_embedding.json | 0 .../darth-vader_with_embedding.json | 0 .../death-star_with_embedding.json | 0 .../endor_with_embedding.json | 0 .../executor_with_embedding.json | 0 .../hoth_with_embedding.json | 0 .../kamino_with_embedding.json | 0 .../leia-organa_with_embedding.json | 0 .../luke-skywalker_with_embedding.json | 0 .../millennium-falcon_with_embedding.json | 0 .../naboo_with_embedding.json | 0 .../obi-wan-kenobi_with_embedding.json | 0 .../owen-lars_with_embedding.json | 0 .../r2-d2_with_embedding.json | 0 .../r5-d4_with_embedding.json | 0 .../rebel-transport_with_embedding.json | 0 .../sentinel-class-landing-craft_with_embedding.json | 0 .../star-destroyer_with_embedding.json | 0 .../tatooine_with_embedding.json | 0 .../tie-advanced-x1_with_embedding.json | 0 .../x-wing_with_embedding.json | 0 .../y-wing_with_embedding.json | 0 .../yavin-iv_with_embedding.json | 0 30 files changed, 0 insertions(+), 0 deletions(-) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/alderaan_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/beru-whitesun-lars_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/bespin_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/biggs-darklighter_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/c-3po_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/coruscant_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/cr90-corvette_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/dagobah_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/darth-vader_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/death-star_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/endor_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/executor_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/hoth_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/kamino_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/leia-organa_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/luke-skywalker_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/millennium-falcon_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/naboo_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/obi-wan-kenobi_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/owen-lars_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/r2-d2_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/r5-d4_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/rebel-transport_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/sentinel-class-landing-craft_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/star-destroyer_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/tatooine_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/tie-advanced-x1_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/x-wing_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/y-wing_with_embedding.json (100%) rename data/{individual_items_with_embeddng => individual_items_with_embedding}/yavin-iv_with_embedding.json (100%) diff --git a/data/individual_items_with_embeddng/alderaan_with_embedding.json b/data/individual_items_with_embedding/alderaan_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/alderaan_with_embedding.json rename to data/individual_items_with_embedding/alderaan_with_embedding.json diff --git a/data/individual_items_with_embeddng/beru-whitesun-lars_with_embedding.json b/data/individual_items_with_embedding/beru-whitesun-lars_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/beru-whitesun-lars_with_embedding.json rename to data/individual_items_with_embedding/beru-whitesun-lars_with_embedding.json diff --git a/data/individual_items_with_embeddng/bespin_with_embedding.json b/data/individual_items_with_embedding/bespin_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/bespin_with_embedding.json rename to data/individual_items_with_embedding/bespin_with_embedding.json diff --git a/data/individual_items_with_embeddng/biggs-darklighter_with_embedding.json b/data/individual_items_with_embedding/biggs-darklighter_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/biggs-darklighter_with_embedding.json rename to data/individual_items_with_embedding/biggs-darklighter_with_embedding.json diff --git a/data/individual_items_with_embeddng/c-3po_with_embedding.json b/data/individual_items_with_embedding/c-3po_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/c-3po_with_embedding.json rename to data/individual_items_with_embedding/c-3po_with_embedding.json diff --git a/data/individual_items_with_embeddng/coruscant_with_embedding.json b/data/individual_items_with_embedding/coruscant_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/coruscant_with_embedding.json rename to data/individual_items_with_embedding/coruscant_with_embedding.json diff --git a/data/individual_items_with_embeddng/cr90-corvette_with_embedding.json b/data/individual_items_with_embedding/cr90-corvette_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/cr90-corvette_with_embedding.json rename to data/individual_items_with_embedding/cr90-corvette_with_embedding.json diff --git a/data/individual_items_with_embeddng/dagobah_with_embedding.json b/data/individual_items_with_embedding/dagobah_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/dagobah_with_embedding.json rename to data/individual_items_with_embedding/dagobah_with_embedding.json diff --git a/data/individual_items_with_embeddng/darth-vader_with_embedding.json b/data/individual_items_with_embedding/darth-vader_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/darth-vader_with_embedding.json rename to data/individual_items_with_embedding/darth-vader_with_embedding.json diff --git a/data/individual_items_with_embeddng/death-star_with_embedding.json b/data/individual_items_with_embedding/death-star_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/death-star_with_embedding.json rename to data/individual_items_with_embedding/death-star_with_embedding.json diff --git a/data/individual_items_with_embeddng/endor_with_embedding.json b/data/individual_items_with_embedding/endor_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/endor_with_embedding.json rename to data/individual_items_with_embedding/endor_with_embedding.json diff --git a/data/individual_items_with_embeddng/executor_with_embedding.json b/data/individual_items_with_embedding/executor_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/executor_with_embedding.json rename to data/individual_items_with_embedding/executor_with_embedding.json diff --git a/data/individual_items_with_embeddng/hoth_with_embedding.json b/data/individual_items_with_embedding/hoth_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/hoth_with_embedding.json rename to data/individual_items_with_embedding/hoth_with_embedding.json diff --git a/data/individual_items_with_embeddng/kamino_with_embedding.json b/data/individual_items_with_embedding/kamino_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/kamino_with_embedding.json rename to data/individual_items_with_embedding/kamino_with_embedding.json diff --git a/data/individual_items_with_embeddng/leia-organa_with_embedding.json b/data/individual_items_with_embedding/leia-organa_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/leia-organa_with_embedding.json rename to data/individual_items_with_embedding/leia-organa_with_embedding.json diff --git a/data/individual_items_with_embeddng/luke-skywalker_with_embedding.json b/data/individual_items_with_embedding/luke-skywalker_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/luke-skywalker_with_embedding.json rename to data/individual_items_with_embedding/luke-skywalker_with_embedding.json diff --git a/data/individual_items_with_embeddng/millennium-falcon_with_embedding.json b/data/individual_items_with_embedding/millennium-falcon_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/millennium-falcon_with_embedding.json rename to data/individual_items_with_embedding/millennium-falcon_with_embedding.json diff --git a/data/individual_items_with_embeddng/naboo_with_embedding.json b/data/individual_items_with_embedding/naboo_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/naboo_with_embedding.json rename to data/individual_items_with_embedding/naboo_with_embedding.json diff --git a/data/individual_items_with_embeddng/obi-wan-kenobi_with_embedding.json b/data/individual_items_with_embedding/obi-wan-kenobi_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/obi-wan-kenobi_with_embedding.json rename to data/individual_items_with_embedding/obi-wan-kenobi_with_embedding.json diff --git a/data/individual_items_with_embeddng/owen-lars_with_embedding.json b/data/individual_items_with_embedding/owen-lars_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/owen-lars_with_embedding.json rename to data/individual_items_with_embedding/owen-lars_with_embedding.json diff --git a/data/individual_items_with_embeddng/r2-d2_with_embedding.json b/data/individual_items_with_embedding/r2-d2_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/r2-d2_with_embedding.json rename to data/individual_items_with_embedding/r2-d2_with_embedding.json diff --git a/data/individual_items_with_embeddng/r5-d4_with_embedding.json b/data/individual_items_with_embedding/r5-d4_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/r5-d4_with_embedding.json rename to data/individual_items_with_embedding/r5-d4_with_embedding.json diff --git a/data/individual_items_with_embeddng/rebel-transport_with_embedding.json b/data/individual_items_with_embedding/rebel-transport_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/rebel-transport_with_embedding.json rename to data/individual_items_with_embedding/rebel-transport_with_embedding.json diff --git a/data/individual_items_with_embeddng/sentinel-class-landing-craft_with_embedding.json b/data/individual_items_with_embedding/sentinel-class-landing-craft_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/sentinel-class-landing-craft_with_embedding.json rename to data/individual_items_with_embedding/sentinel-class-landing-craft_with_embedding.json diff --git a/data/individual_items_with_embeddng/star-destroyer_with_embedding.json b/data/individual_items_with_embedding/star-destroyer_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/star-destroyer_with_embedding.json rename to data/individual_items_with_embedding/star-destroyer_with_embedding.json diff --git a/data/individual_items_with_embeddng/tatooine_with_embedding.json b/data/individual_items_with_embedding/tatooine_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/tatooine_with_embedding.json rename to data/individual_items_with_embedding/tatooine_with_embedding.json diff --git a/data/individual_items_with_embeddng/tie-advanced-x1_with_embedding.json b/data/individual_items_with_embedding/tie-advanced-x1_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/tie-advanced-x1_with_embedding.json rename to data/individual_items_with_embedding/tie-advanced-x1_with_embedding.json diff --git a/data/individual_items_with_embeddng/x-wing_with_embedding.json b/data/individual_items_with_embedding/x-wing_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/x-wing_with_embedding.json rename to data/individual_items_with_embedding/x-wing_with_embedding.json diff --git a/data/individual_items_with_embeddng/y-wing_with_embedding.json b/data/individual_items_with_embedding/y-wing_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/y-wing_with_embedding.json rename to data/individual_items_with_embedding/y-wing_with_embedding.json diff --git a/data/individual_items_with_embeddng/yavin-iv_with_embedding.json b/data/individual_items_with_embedding/yavin-iv_with_embedding.json similarity index 100% rename from data/individual_items_with_embeddng/yavin-iv_with_embedding.json rename to data/individual_items_with_embedding/yavin-iv_with_embedding.json From b48c41d2ef9664001fd045ef29359a8406948ff7 Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Fri, 3 Jan 2025 12:41:52 +0200 Subject: [PATCH 2/4] fix path to config file in readme instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b1fecb3..fd484f3 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ cd data/individual_items_with_embedding Open up Couchbase shell passing in an argument with the location of the config file defining your Couchbase information: ```bash -cbsh --config-dir ../config-file +cbsh --config-dir ../../config-file ``` Once in the shell, run the `nodes` command to just perform a sanity check that you are connected to the correct cluster. From 2a2b0474d6a417cca520a2b3fc34e62dabc7cbd7 Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Fri, 3 Jan 2025 12:44:22 +0200 Subject: [PATCH 3/4] include bucket default for config file instructions in readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index fd484f3..baf23eb 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,14 @@ Once you click on the "Connect" tab, you will see a section called "Couchbase Sh Get Couchbase Shell config file data +Make sure to add the `default-bucket` field to the config file with the name of the bucket you created earlier. + +```bash +default-bucket = "your-bucket-name" +``` + +You can find an example config file in the `./config_file` directory for reference. + #### Import Data with Couchbase Shell Change into the directory where the data files with embeddings are: From 6604be5630b30dc1983679265fae900f0c076dbf Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Fri, 3 Jan 2025 12:48:46 +0200 Subject: [PATCH 4/4] include primary fts index creation instructions in readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index baf23eb..8a8be3a 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,14 @@ Now, import the data into the bucket you created earlier: ls *_with_embedding.json | each { |it| open $it.name | wrap content | insert id $in.content._default.name } | doc upsert ``` +While, in this workshop we are focused on creating a *vector search index*, you can also create a primary search index to enable full-text search on the data: + +```bash +query "create primary index on name_of_your_bucket._default._default" +``` + +Make sure to replace the `name_of_your_bucket` with the name of your bucket you created. + Once this is done, you can perform a sanity check to ensure the documents were inserted by running a query to select just one: ```bash