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

Improvements #12

Merged
merged 4 commits into from
Jan 3, 2025
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
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ Once you click on the "Connect" tab, you will see a section called "Couchbase Sh

<img src="workshop_images/get_cbshell_config.png" alt="Get Couchbase Shell config file data" width="50%">

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:
Expand All @@ -143,7 +151,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.
Expand All @@ -168,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
Expand Down
Loading