Skip to content

Commit ce925a7

Browse files
Merge pull request #12 from hummusonrails/improvements
Improvements
2 parents a3e77af + 6604be5 commit ce925a7

31 files changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ Once you click on the "Connect" tab, you will see a section called "Couchbase Sh
132132

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

135+
Make sure to add the `default-bucket` field to the config file with the name of the bucket you created earlier.
136+
137+
```bash
138+
default-bucket = "your-bucket-name"
139+
```
140+
141+
You can find an example config file in the `./config_file` directory for reference.
142+
135143
#### Import Data with Couchbase Shell
136144

137145
Change into the directory where the data files with embeddings are:
@@ -143,7 +151,7 @@ cd data/individual_items_with_embedding
143151
Open up Couchbase shell passing in an argument with the location of the config file defining your Couchbase information:
144152

145153
```bash
146-
cbsh --config-dir ../config-file
154+
cbsh --config-dir ../../config-file
147155
```
148156

149157
Once in the shell, run the `nodes` command to just perform a sanity check that you are connected to the correct cluster.
@@ -168,6 +176,14 @@ Now, import the data into the bucket you created earlier:
168176
ls *_with_embedding.json | each { |it| open $it.name | wrap content | insert id $in.content._default.name } | doc upsert
169177
```
170178
179+
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:
180+
181+
```bash
182+
query "create primary index on name_of_your_bucket._default._default"
183+
```
184+
185+
Make sure to replace the `name_of_your_bucket` with the name of your bucket you created.
186+
171187
Once this is done, you can perform a sanity check to ensure the documents were inserted by running a query to select just one:
172188
173189
```bash

data/individual_items_with_embeddng/alderaan_with_embedding.json renamed to data/individual_items_with_embedding/alderaan_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/beru-whitesun-lars_with_embedding.json renamed to data/individual_items_with_embedding/beru-whitesun-lars_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/bespin_with_embedding.json renamed to data/individual_items_with_embedding/bespin_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/biggs-darklighter_with_embedding.json renamed to data/individual_items_with_embedding/biggs-darklighter_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/c-3po_with_embedding.json renamed to data/individual_items_with_embedding/c-3po_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/coruscant_with_embedding.json renamed to data/individual_items_with_embedding/coruscant_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/cr90-corvette_with_embedding.json renamed to data/individual_items_with_embedding/cr90-corvette_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/dagobah_with_embedding.json renamed to data/individual_items_with_embedding/dagobah_with_embedding.json

File renamed without changes.

data/individual_items_with_embeddng/darth-vader_with_embedding.json renamed to data/individual_items_with_embedding/darth-vader_with_embedding.json

File renamed without changes.

0 commit comments

Comments
 (0)