Docs Menu
Docs Home
/
Atlas
/ /

Atlas クラスターのデータに対してセマンティック検索を実行する方法

このチュートリアルでは、クラスター上の sample_mflix.embedded_moviesコレクション内の plot_embedding_voyage_3_largeフィールド内のベクトルに対して ANN 検索を実行する方法について説明します。これを示すには、次の手順に従います。

  1. sample_mflix.embedded_moviesコレクション内の plot_embedding_voyage_3_large という名前の数値フィールドにMongoDB ベクトル検索インデックスを作成します。

  2. sample_mflix.embedded_moviesコレクションの plot_embedding_voyage_3_largeフィールドに対してMongoDB ベクトル検索クエリを実行します。


[ 言語を選択 ] ドロップダウン メニューを使用して、 MongoDB ベクトル検索インデックスを作成し、クエリを実行するために使用するクライアントを選択します。


このチュートリアルの実行可能なバージョンを Python エディタとして操作します。

始める前に、共通の前提条件を履行してください。このチュートリアルには、以下のクライアントの例が含まれています。

このセクションでは、フィールドに対してベクトルクエリを実行中ために、sample_mflix.embedded_moviesコレクションの plot_embedding_voyage_3_largeフィールドにMongoDB ベクトル検索インデックスを作成する方法を説明します。

MongoDB ベクトル検索インデックスを作成するには、プロジェクトに対する Project Data Access Admin 以上のアクセス権が必要です。

1

MongoDB Search ページには、Search & Vector Search オプションまたは Data Explorer から移動できます。

2
3

ページで次の選択を行い、Next をクリックしてください。

Search Type

Vector Search のインデックスタイプを選択します。

Index Name and Data Source

以下の情報を指定してください。

  • Index Name: vector_index

  • Database and Collection:

    • sample_mflix database

    • embedded_movies コレクション

Configuration Method

For a guided experience, select Visual Editor.

To edit the raw index definition, select JSON Editor.

重要:

MongoDB Searchインデックスの名前はデフォルトで default です。この名前を維持する場合、インデックスは、演算子に別の index オプションを指定していないMongoDB Search クエリのデフォルトの検索インデックスになります。複数のインデックスを作成する場合は、インデックス間で一貫した記述的な命名規則を維持することをお勧めします。

4

このステップでは、次のフィールドに対して vectorSearch タイプのインデックスを定義します。

  • plot_embedding_voyage_3_large ベクトル タイプとしてのフィールド。plot_embedding_voyage_3_large フィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048 ベクトル次元を指定し、dotProduct を使用して類似性を測定します。

  • genres フィールドの string 値でデータを事前にフィルタリングするフィルタータイプとして、 フィールドを使用します。

  • year フィールド には、フィールド内の数値でデータを事前にフィルタリングするためのフィルタータイプが含まれています。

Atlas は、ベクトル埋め込みを含むフィールドとその対応する次元を自動的に検出します。sample_mflix.embedded_movies コレクションでは、plot_embedding フィールドと plot_embedding_voyage_3_large フィールドが表示されます。このチュートリアルでは、plot_embedding_voyage_3_large フィールドのみのインデックスを作成する必要があります。

インデックスを設定するには、次の操作を行う必要があります。

  1. Similarity MethodドロップダウンからDot Productを選択します。

  2. [Advanced] をクリックして、ドロップダウンメニューから Scalar 量子化を選択します。

  3. Filter Field セクションで、genres フィールドと year フィールドを指定してデータをフィルタリングします。

デフォルトの定義を、以下のインデックス定義で置き換えます。

1{
2 "fields": [
3 {
4 "type": "vector",
5 "path": "plot_embedding_voyage_3_large",
6 "numDimensions": 2048,
7 "similarity": "dotProduct",
8 "quantization": "scalar"
9 },
10 {
11 "type": "filter",
12 "path": "genres"
13 },
14 {
15 "type": "filter",
16 "path": "year"
17 }
18 ]
19}
5
6

Atlas は、インデックスが作成中であることを知らせるモーダル ウィンドウを表示します。

7
8

新しく作成したインデックスは Atlas Search タブに表示されます。インデックスを作成する間、Status フィールドには Build in Progress と表示されます。インデックスの作成が完了すると、Status フィールドの表示は Active になります。

注意

コレクションが大きいほど、インデックスの作成に時間がかかります。インデックスの作成が完了すると、メール通知が届きます。

1

ターミナル ウィンドウでmongoshを開き、クラスターに接続します。 接続の詳細な手順については、「 mongosh 経由での接続 」を参照してください。

2

use sample_mflix
switched to db sample_mflix
3

次のインデックス定義を使用すると、plot_embedding_voyage_3_large フィールドが vector タイプとして、genresyear フィールドが filter タイプとしてインデックス化されます。

plot_embedding_voyage_3_large フィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された 2048 次元のベクトル埋め込みが含まれています。インデックスは dotProduct 関数を使用して類似性を測定します。

1db.embedded_movies.createSearchIndex(
2 "vector_index",
3 "vectorSearch",
4 {
5 "fields": [
6 {
7 "type": "vector",
8 "path": "plot_embedding_voyage_3_large",
9 "numDimensions": 2048,
10 "similarity": "dotProduct"
11 },
12 {
13 "type": "filter",
14 "path": "genres"
15 },
16 {
17 "type": "filter",
18 "path": "year"
19 }
20 ]
21 }
22);
1

MongoDB C# ドライバーを依存関係としてプロジェクトに追加します。

dotnet add package MongoDB.Driver
2

IndexService.cs という名前のファイルを作成し、次のコードをコピーしてファイルに貼り付けます。

このインデックス定義は、 MongoDB ベクトル検索インデックスの で、plot_embedding_voyage_3_largeフィールドをvector タイプとしてインデックス化し、genres フィールドと year フィールドを filter タイプとしてインデックス化します。plot_embedding_voyage_3_largeフィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048ベクトル次元を指定し、dotProduct 関数を使用して類似性を測定します。

IndexService.cs
1namespace query_quick_start;
2
3using MongoDB.Bson;
4using MongoDB.Driver;
5using System;
6using System.Threading;
7
8public class IndexService
9{
10 // Replace the placeholder with your Atlas connection string
11 private const string MongoConnectionString = "<connection-string>";
12 public void CreateVectorIndex()
13 {
14 try
15 {
16 // Connect to your Atlas cluster
17 var client = new MongoClient(MongoConnectionString);
18 var database = client.GetDatabase("sample_mflix");
19 var collection = database.GetCollection<BsonDocument>("embedded_movies");
20
21 var searchIndexView = collection.SearchIndexes;
22 var name = "vector_index";
23 var type = SearchIndexType.VectorSearch;
24
25 var definition = new BsonDocument
26 {
27 { "fields", new BsonArray
28 {
29 new BsonDocument
30 {
31 { "type", "vector" },
32 { "path", "plot_embedding_voyage_3_large" },
33 { "numDimensions", 2048 },
34 { "similarity", "dotProduct" },
35 { "quantization", "scalar"}
36 },
37 new BsonDocument
38 {
39 {"type", "filter"},
40 {"path", "genres"}
41 },
42 new BsonDocument
43 {
44 {"type", "filter"},
45 {"path", "year"}
46 }
47 }
48 }
49 };
50
51 var model = new CreateSearchIndexModel(name, type, definition);
52
53 searchIndexView.CreateOne(model);
54 Console.WriteLine($"New search index named {name} is building.");
55
56 // Polling for index status
57 Console.WriteLine("Polling to check if the index is ready. This may take up to a minute.");
58 bool queryable = false;
59 while (!queryable)
60 {
61 var indexes = searchIndexView.List();
62 foreach (var index in indexes.ToEnumerable())
63 {
64 if (index["name"] == name)
65 {
66 queryable = index["queryable"].AsBoolean;
67 }
68 }
69 if (!queryable)
70 {
71 Thread.Sleep(5000);
72 }
73 }
74 Console.WriteLine($"{name} is ready for querying.");
75 }
76 catch (Exception e)
77 {
78 Console.WriteLine($"Exception: {e.Message}");
79 }
80 }
81}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4

Program.cs を更新して IndexService を初期化し、インデックスを作成するためのメソッドを呼び出します。

Program.cs
using query_quick_start;
var indexService = new IndexService();
indexService.CreateVectorIndex();
5

ファイルを保存してからプロジェクトをコンパイルし、実行してインデックスを作成します。

dotnet run query_quick_start.csproj
New search index named vector_index is building.
Polling to check if the index is ready. This may take up to a minute.
vector_index is ready for querying.
1

Go ドライバーを依存関係としてプロジェクトに追加します。

go get go.mongodb.org/mongo-driver/v2/mongo
2

vector-index.go という名前のファイルを作成し、次のコードをコピーしてファイルに貼り付けます。

このインデックス定義は、 MongoDB ベクトル検索インデックスの で、plot_embedding_voyage_3_largeフィールドをvector タイプとしてインデックス化し、genres フィールドと year フィールドを filter タイプとしてインデックス化します。plot_embedding_voyage_3_largeフィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048ベクトル次元を指定し、dotProduct 関数を使用して類似性を測定します。

vector-index.go
1package main
2
3import (
4 "context"
5 "fmt"
6 "log"
7 "time"
8
9 "go.mongodb.org/mongo-driver/v2/bson"
10 "go.mongodb.org/mongo-driver/v2/mongo"
11 "go.mongodb.org/mongo-driver/v2/mongo/options"
12)
13
14func main() {
15 ctx := context.Background()
16
17 // Replace the placeholder with your Atlas connection string
18 const uri = "<connectionString>"
19
20 // Connect to your Atlas cluster
21 clientOptions := options.Client().ApplyURI(uri)
22 client, err := mongo.Connect(clientOptions)
23 if err != nil {
24 log.Fatalf("failed to connect to the server: %v", err)
25 }
26 defer func() { _ = client.Disconnect(ctx) }()
27
28 // Set the namespace
29 coll := client.Database("sample_mflix").Collection("embedded_movies")
30 indexName := "vector_index"
31 opts := options.SearchIndexes().SetName(indexName).SetType("vectorSearch")
32
33 type vectorDefinitionField struct {
34 Type string `bson:"type"`
35 Path string `bson:"path"`
36 NumDimensions int `bson:"numDimensions"`
37 Similarity string `bson:"similarity"`
38 Quantization string `bson:"quantization"`
39 }
40
41 type filterField struct {
42 Type string `bson:"type"`
43 Path string `bson:"path"`
44 }
45
46 type indexDefinition struct {
47 Fields []vectorDefinitionField `bson:"fields"`
48 }
49
50 vectorDefinition := vectorDefinitionField{
51 Type: "vector",
52 Path: "plot_embedding_voyage_3_large",
53 NumDimensions: 2048,
54 Similarity: "dotProduct",
55 Quantization: "scalar"}
56 genreFilterDefinition := filterField{"filter", "genres"}
57 yearFilterDefinition := filterField{"filter", "year"}
58
59 indexModel := mongo.SearchIndexModel{
60 Definition: bson.D{{Key: "fields", Value: [3]interface{}{
61 vectorDefinition,
62 genreFilterDefinition,
63 yearFilterDefinition}}},
64 Options: opts,
65 }
66
67 // Create the index
68 searchIndexName, err := coll.SearchIndexes().CreateOne(ctx, indexModel)
69 if err != nil {
70 log.Fatalf("failed to create the search index: %v", err)
71 }
72 log.Println("New search index named " + searchIndexName + " is building.")
73
74 // Await the creation of the index.
75 log.Println("Polling to check if the index is ready. This may take up to a minute.")
76 searchIndexes := coll.SearchIndexes()
77 var doc bson.Raw
78 for doc == nil {
79 cursor, err := searchIndexes.List(ctx, options.SearchIndexes().SetName(searchIndexName))
80 if err != nil {
81 fmt.Errorf("failed to list search indexes: %w", err)
82 }
83
84 if !cursor.Next(ctx) {
85 break
86 }
87
88 name := cursor.Current.Lookup("name").StringValue()
89 queryable := cursor.Current.Lookup("queryable").Boolean()
90 if name == searchIndexName && queryable {
91 doc = cursor.Current
92 } else {
93 time.Sleep(5 * time.Second)
94 }
95 }
96
97 log.Println(searchIndexName + " is ready for querying.")
98}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
go run vector-index.go
2024/10/17 09:38:21 Creating the index.
2024/10/17 09:38:22 Polling to confirm successful index creation.
2024/10/17 09:38:22 NOTE: This may take up to a minute.
2024/10/17 09:38:48 Name of Index Created: vector_index
1
  1. Java ドライバーバージョン 5.2 以降をプロジェクトの依存関係として追加してください。パッケージマネージャーに応じて、次のいずれかのタブを選択してください。

    Maven を使用している場合は、プロジェクトの pom.xmlファイルの dependencies 配列に次の依存関係を追加します。

    pom.xml
    <dependencies>
    <!-- MongoDB Java Sync Driver v5.2.0 or later -->
    <dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongodb-driver-sync</artifactId>
    <version>[5.2.0,)</version>
    </dependency>
    </dependencies>
  2. パッケージマネージャーを実行して、プロジェクトに依存関係をインストールします。

詳しいインストール手順やバージョンの互換性については MongoDB Java Driver のドキュメントを参照ください。

2

VectorIndex.java という名前のファイルを作成し、次のコードをコピーしてファイルに貼り付けます。

このインデックス定義は、 MongoDB ベクトル検索インデックスの で、plot_embedding_voyage_3_largeフィールドをvector タイプとしてインデックス化し、genres フィールドと year フィールドを filter タイプとしてインデックス化します。plot_embedding_voyage_3_largeフィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048ベクトル次元を指定し、dotProduct 関数を使用して類似性を測定します。

VectorIndex.java
1import com.mongodb.client.MongoClient;
2import com.mongodb.client.MongoClients;
3import com.mongodb.client.MongoCollection;
4import com.mongodb.client.MongoDatabase;
5import com.mongodb.client.model.SearchIndexModel;
6import com.mongodb.client.model.SearchIndexType;
7import org.bson.Document;
8import org.bson.conversions.Bson;
9
10import java.util.Arrays;
11import java.util.Collections;
12import java.util.List;
13
14public class VectorIndex {
15
16 public static void main(String[] args) {
17
18 // Replace the placeholder with your Atlas connection string
19 String uri = "<connectionString>";
20
21 // Connect to your Atlas cluster
22 try (MongoClient mongoClient = MongoClients.create(uri)) {
23
24 // Set the namespace
25 MongoDatabase database = mongoClient.getDatabase("sample_mflix");
26 MongoCollection<Document> collection = database.getCollection("embedded_movies");
27
28 // Define the index details with the filter fields
29 String indexName = "vector_index";
30 Bson definition = new Document(
31 "fields",
32 Arrays.asList(
33 new Document("type", "vector")
34 .append("path", "plot_embedding_voyage_3_large")
35 .append("numDimensions", 2048)
36 .append("similarity", "dotProduct")
37 .append("quantization", "scalar"),
38 new Document("type", "filter")
39 .append("path", "genres"),
40 new Document("type", "filter")
41 .append("path", "year")));
42
43 // Define the index model
44 SearchIndexModel indexModel = new SearchIndexModel(
45 indexName,
46 definition,
47 SearchIndexType.vectorSearch());
48
49 // Create the index using the defined model
50 List<String> result = collection.createSearchIndexes(Collections.singletonList(indexModel));
51 System.out.println("Successfully created vector index named: " + result.get(0));
52 System.out.println("It may take up to a minute for the index to leave the BUILDING status and become queryable.");
53
54 // Wait for index to build and become queryable
55 System.out.println("Polling to confirm the index has left the BUILDING status.");
56 // No special handling in case of a timeout. Custom handling can be implemented.
57 waitForIndex(collection, indexName);
58 }
59 }
60
61 /**
62 * Polls the collection to check whether the specified index is ready to query.
63 */
64 public static <T> boolean waitForIndex(final MongoCollection<T> collection, final String indexName) {
65 long startTime = System.nanoTime();
66 long timeoutNanos = TimeUnit.SECONDS.toNanos(60);
67 while (System.nanoTime() - startTime < timeoutNanos) {
68 Document indexRecord = StreamSupport.stream(collection.listSearchIndexes().spliterator(), false)
69 .filter(index -> indexName.equals(index.getString("name")))
70 .findAny().orElse(null);
71 if (indexRecord != null) {
72 if ("FAILED".equals(indexRecord.getString("status"))) {
73 throw new RuntimeException("Search index has FAILED status.");
74 }
75 if (indexRecord.getBoolean("queryable")) {
76 System.out.println(indexName + " index is ready to query");
77 return true;
78 }
79 }
80 try {
81 Thread.sleep(100); // busy-wait, avoid in production
82 } catch (InterruptedException e) {
83 Thread.currentThread().interrupt();
84 throw new RuntimeException(e);
85 }
86 }
87 return false;
88 }
89}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4

IDE でファイルを実行するか、コマンドラインからコマンドを実行してコードを実行します。

javac VectorIndex.java
java VectorIndex
Successfully created a vector index named: [vector_index]
It may take up to a minute for the index to build before you can query using it.
Polling to confirm the index has completed building.
vector_index index is ready to query
1

MongoDB Node ドライバーを依存関係としてプロジェクトに追加します。

npm install mongodb

Tip

このページの例では、プロジェクトが CommonJS モジュールとしてモジュールを管理することを前提としています。ES モジュールを使用している場合は、代わりにインポート構文を変更する必要があります。

2

vector-index.js という名前のファイルを作成し、次のコードをコピーしてファイルに貼り付けます。

このインデックス定義は、 MongoDB ベクトル検索インデックスの で、plot_embedding_voyage_3_largeフィールドをvector タイプとしてインデックス化し、genres フィールドと year フィールドを filter タイプとしてインデックス化します。plot_embedding_voyage_3_largeフィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048ベクトル次元を指定し、dotProduct 関数を使用して類似性を測定します。

vector-index.js
1const { MongoClient } = require("mongodb");
2
3// connect to your Atlas deployment
4const uri = "<connectionString>";
5
6const client = new MongoClient(uri);
7
8async function run() {
9 try {
10 const database = client.db("sample_mflix");
11 const collection = database.collection("embedded_movies");
12
13 // define your MongoDB Vector Search index
14 const index = {
15 name: "vector_index",
16 type: "vectorSearch",
17 definition: {
18 "fields": [
19 {
20 "type": "vector",
21 "numDimensions": 2048,
22 "path": "plot_embedding_voyage_3_large",
23 "similarity": "dotProduct",
24 "quantization": "scalar"
25 },
26 {
27 "type": "filter",
28 "path": "genres"
29 },
30 {
31 "type": "filter",
32 "path": "year"
33 }
34 ]
35 }
36 }
37
38 // run the helper method
39 const result = await collection.createSearchIndex(index);
40 console.log(`New search index named ${result} is building.`);
41
42 // wait for the index to be ready to query
43 console.log("Polling to check if the index is ready. This may take up to a minute.")
44 let isQueryable = false;
45 while (!isQueryable) {
46 const cursor = collection.listSearchIndexes();
47 for await (const index of cursor) {
48 if (index.name === result) {
49 if (index.queryable) {
50 console.log(`${result} is ready for querying.`);
51 isQueryable = true;
52 } else {
53 await new Promise(resolve => setTimeout(resolve, 5000));
54 }
55 }
56 }
57 }
58 } finally {
59 await client.close();
60 }
61}
62run().catch(console.dir);
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
node vector-index.js
vector_index
1

PyMongoドライバーを依存関係としてプロジェクトに追加します。

pip install pymongo
2

vector-index.py という名前のファイルを作成し、次のコードをコピーしてファイルに貼り付けます。

このインデックス定義は、 MongoDB ベクトル検索インデックスの で、plot_embedding_voyage_3_largeフィールドをvector タイプとしてインデックス化し、genres フィールドと year フィールドを filter タイプとしてインデックス化します。plot_embedding_voyage_3_largeフィールドには、Voyage AI の voyage-3-large 埋め込みモデルを使用して作成された埋め込みが含まれます。インデックス定義では、2048ベクトル次元を指定し、dotProduct 関数を使用して類似性を測定し、ベクトルを効率的に処理するための自動 scalar 量子化を有効にします。

vector-index.py
1from pymongo.mongo_client import MongoClient
2from pymongo.operations import SearchIndexModel
3import time
4
5# Connect to your Atlas deployment
6uri = "<connectionString>"
7client = MongoClient(uri)
8
9# Access your database and collection
10database = client["sample_mflix"]
11collection = database["embedded_movies"]
12
13# Create your index model, then create the search index
14search_index_model = SearchIndexModel(
15 definition={
16 "fields": [
17 {
18 "type": "vector",
19 "path": "plot_embedding_voyage_3_large",
20 "numDimensions": 2048,
21 "similarity": "dotProduct",
22 "quantization": "scalar"
23 },
24 {
25 "type": "filter",
26 "path": "genres"
27 },
28 {
29 "type": "filter",
30 "path": "year"
31 }
32 ]
33 },
34 name="vector_index",
35 type="vectorSearch"
36)
37
38result = collection.create_search_index(model=search_index_model)
39print("New search index named " + result + " is building.")
40
41# Wait for initial sync to complete
42print("Polling to check if the index is ready. This may take up to a minute.")
43predicate=None
44if predicate is None:
45 predicate = lambda index: index.get("queryable") is True
46
47while True:
48 indices = list(collection.list_search_indexes(result))
49 if len(indices) and predicate(indices[0]):
50 break
51 time.sleep(5)
52print(result + " is ready for querying.")
53
54client.close()
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
python vector-index.py
vector_index

このセクションでは、 $vectorSearchステージを使用して、 sample_mflix.embedded_moviesコレクション内のインデックス付きベクトル データをクエリする方法を説明します。 これらのサンプル クエリでは、セマンティック検索を実行するデータを事前にフィルタリングするためにクエリで使用できるさまざまなクエリおよび集計パイプライン演算子も示されています。

1

次の埋め込みを query-embeddings.js という名前のファイルに保存してください。

KIDS_ADVENTURE_EMBEDDING=[-0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558];
STAR_WARS_EMBEDDING=[-0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494];
2

ターミナル ウィンドウでmongoshを開き、クラスターに接続します。 接続の詳細な手順については、「 mongosh 経由での接続 」を参照してください。

3

埋め込みをクエリで使用するには、ファイルを mongosh にロードしてください。

load('/<path-to-file>/query-embeddings.js');
4
use sample_mflix
switched to db sample_mflix
5

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1db.embedded_movies.aggregate([
2 {
3 "$vectorSearch": {
4 "index": "vector_index",
5 "path": "plot_embedding_voyage_3_large",
6 "filter": {
7 "$and": [{
8 "genres": {
9 "$nin": ["Drama", "Western", "Crime"],
10 "$in": ["Action", "Adventure", "Family"]
11 },
12 }, {
13 "year": {
14 "$gte": 1960,
15 "$lte": 2000
16 }
17 }]
18 },
19 "queryVector": KIDS_ADVENTURE_EMBEDDING,
20 "numCandidates": 200,
21 "limit": 10
22 }
23 },
24 {
25 "$project": {
26 "_id": 0,
27 "title": 1,
28 "genres": 1,
29 "plot": 1,
30 "year": 1,
31 "score": { $meta: "vectorSearchScore" }
32 }
33 }
34])
1[
2 {
3 plot: 'Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...',
4 genres: [ 'Action', 'Adventure', 'Comedy' ],
5 title: '3 Ninjas: High Noon at Mega Mountain',
6 year: 1998,
7 score: 0.7746343612670898
8 },
9 {
10 plot: "A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...",
11 genres: [ 'Action', 'Adventure', 'Family' ],
12 title: 'White Wolves: A Cry in the Wild II',
13 year: 1993,
14 score: 0.770106315612793
15 },
16 {
17 plot: 'A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.',
18 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
19 title: 'Space Raiders',
20 year: 1983,
21 score: 0.7569591999053955
22 },
23 {
24 plot: 'Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.',
25 genres: [ 'Adventure', 'Family', 'Fantasy' ],
26 title: 'The Ewok Adventure',
27 year: 1984,
28 score: 0.7515435218811035
29 },
30 {
31 plot: 'A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.',
32 genres: [ 'Adventure', 'Comedy', 'Fantasy' ],
33 title: 'Time Bandits',
34 year: 1981,
35 score: 0.7513599395751953
36 },
37 {
38 plot: 'A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.',
39 genres: [ 'Adventure', 'Family', 'Fantasy' ],
40 title: 'Chitty Chitty Bang Bang',
41 year: 1968,
42 score: 0.7492260932922363
43 },
44 {
45 plot: 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
46 genres: [ 'Action', 'Adventure', 'Comedy' ],
47 title: 'Forest Warrior',
48 year: 1996,
49 score: 0.7473714351654053
50 },
51 {
52 plot: 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
53 genres: [ 'Action', 'Adventure', 'Comedy' ],
54 title: 'Forest Warrior',
55 year: 1996,
56 score: 0.7473714351654053
57 },
58 {
59 plot: 'A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.',
60 genres: [ 'Action', 'Fantasy', 'Adventure' ],
61 title: 'Warriors of Virtue',
62 year: 1997,
63 score: 0.7464213371276855
64 },
65 {
66 plot: 'A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...',
67 genres: [ 'Animation', 'Adventure', 'Fantasy' ],
68 title: 'Taxandria',
69 year: 1994,
70 score: 0.7453246116638184
71 }
72]

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1db.embedded_movies.aggregate([
2 {
3 "$vectorSearch": {
4 "index": "vector_index",
5 "path": "plot_embedding_voyage_3_large",
6 "filter": {
7 "$or": [{
8 "genres": { "$ne": "Crime" }
9 }, {
10 "$and": [{
11 "year": { "$lte": 2015 }
12 }, {
13 "genres": { "$eq": "Action" }
14 }]
15 }]
16 },
17 "queryVector": STAR_WARS_EMBEDDING,
18 "numCandidates": 200,
19 "limit": 10
20 }
21 },
22 {
23 "$project": {
24 "_id": 0,
25 "title": 1,
26 "genres": 1,
27 "plot": 1,
28 "released": 1,
29 "score": { $meta: "vectorSearchScore" }
30 }
31 }
32])
1[
2 {
3 plot: "Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.",
4 genres: [ 'Action', 'Adventure', 'Fantasy' ],
5 title: 'Star Wars: Episode IV - A New Hope',
6 released: ISODate('1977-05-25T00:00:00.000Z'),
7 score: 0.79868483543396
8 },
9 {
10 plot: "A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.",
11 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
12 title: 'Dune',
13 released: ISODate('1984-12-14T00:00:00.000Z'),
14 score: 0.7949700355529785
15 },
16 {
17 plot: 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
18 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
19 title: 'Message from Space',
20 released: ISODate('1978-10-30T00:00:00.000Z'),
21 score: 0.7913978099822998
22 },
23 {
24 plot: 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
25 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
26 title: 'Message from Space',
27 released: ISODate('1978-10-30T00:00:00.000Z'),
28 score: 0.7913978099822998
29 },
30 {
31 plot: 'After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.',
32 genres: [ 'Action', 'Adventure', 'Fantasy' ],
33 title: 'Star Wars: Episode V - The Empire Strikes Back',
34 released: ISODate('1980-06-20T00:00:00.000Z'),
35 score: 0.7809884548187256
36 },
37 {
38 plot: 'After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.',
39 genres: [ 'Action', 'Adventure', 'Fantasy' ],
40 title: 'Star Wars: Episode VI - Return of the Jedi',
41 released: ISODate('1983-05-25T00:00:00.000Z'),
42 score: 0.7784996032714844
43 },
44 {
45 plot: 'Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.',
46 genres: [ 'Action', 'Adventure', 'Fantasy' ],
47 title: 'Star Wars: Episode I - The Phantom Menace',
48 released: ISODate('1999-05-19T00:00:00.000Z'),
49 score: 0.7766742706298828
50 },
51 {
52 plot: 'The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...',
53 genres: [ 'Adventure', 'Family', 'Fantasy' ],
54 title: 'Ewoks: The Battle for Endor',
55 released: ISODate('1985-11-24T00:00:00.000Z'),
56 score: 0.7676119804382324
57 },
58 {
59 plot: 'A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.',
60 genres: [ 'Action', 'Adventure', 'Fantasy' ],
61 title: 'Krull',
62 released: ISODate('1983-07-29T00:00:00.000Z'),
63 score: 0.7624373435974121
64 },
65 {
66 plot: 'An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.',
67 genres: [ 'Action', 'Adventure', 'Fantasy' ],
68 title: 'Starcrash',
69 released: ISODate('1979-03-09T00:00:00.000Z'),
70 score: 0.7582714557647705
71 }
72]
1

次の埋め込みを query-embeddings.js という名前のファイルに保存してください。

KIDS_ADVENTURE_EMBEDDING=[-0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558];
STAR_WARS_EMBEDDING=[-0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494];
2

ターミナル ウィンドウでmongoshを開き、クラスターに接続します。 接続の詳細な手順については、「 mongosh 経由での接続 」を参照してください。

3

埋め込みをクエリで使用するには、ファイルを mongosh にロードしてください。

load('/<path-to-file>/query-embeddings.js');
4
use sample_mflix
switched to db sample_mflix
5

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1db.embedded_movies.aggregate([
2 {
3 "$vectorSearch": {
4 "index": "vector_index",
5 "path": "plot_embedding_voyage_3_large",
6 "filter": {
7 "$and": [{
8 "genres": {
9 "$nin": ["Drama", "Western", "Crime"],
10 "$in": ["Action", "Adventure", "Family"]
11 },
12 }, {
13 "year": {
14 "$gte": 1960,
15 "$lte": 2000
16 }
17 }]
18 },
19 "queryVector": KIDS_ADVENTURE_EMBEDDING,
20 "numCandidates": 200,
21 "limit": 10
22 }
23 },
24 {
25 "$project": {
26 "_id": 0,
27 "title": 1,
28 "genres": 1,
29 "plot": 1,
30 "year": 1,
31 "score": { $meta: "vectorSearchScore" }
32 }
33 }
34])
1[
2 {
3 plot: 'Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...',
4 genres: [ 'Action', 'Adventure', 'Comedy' ],
5 title: '3 Ninjas: High Noon at Mega Mountain',
6 year: 1998,
7 score: 0.7746343612670898
8 },
9 {
10 plot: "A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...",
11 genres: [ 'Action', 'Adventure', 'Family' ],
12 title: 'White Wolves: A Cry in the Wild II',
13 year: 1993,
14 score: 0.770106315612793
15 },
16 {
17 plot: 'A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.',
18 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
19 title: 'Space Raiders',
20 year: 1983,
21 score: 0.7569591999053955
22 },
23 {
24 plot: 'Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.',
25 genres: [ 'Adventure', 'Family', 'Fantasy' ],
26 title: 'The Ewok Adventure',
27 year: 1984,
28 score: 0.7515435218811035
29 },
30 {
31 plot: 'A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.',
32 genres: [ 'Adventure', 'Comedy', 'Fantasy' ],
33 title: 'Time Bandits',
34 year: 1981,
35 score: 0.7513599395751953
36 },
37 {
38 plot: 'A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.',
39 genres: [ 'Adventure', 'Family', 'Fantasy' ],
40 title: 'Chitty Chitty Bang Bang',
41 year: 1968,
42 score: 0.7492260932922363
43 },
44 {
45 plot: 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
46 genres: [ 'Action', 'Adventure', 'Comedy' ],
47 title: 'Forest Warrior',
48 year: 1996,
49 score: 0.7473714351654053
50 },
51 {
52 plot: 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
53 genres: [ 'Action', 'Adventure', 'Comedy' ],
54 title: 'Forest Warrior',
55 year: 1996,
56 score: 0.7473714351654053
57 },
58 {
59 plot: 'A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.',
60 genres: [ 'Action', 'Fantasy', 'Adventure' ],
61 title: 'Warriors of Virtue',
62 year: 1997,
63 score: 0.7464213371276855
64 },
65 {
66 plot: 'A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...',
67 genres: [ 'Animation', 'Adventure', 'Fantasy' ],
68 title: 'Taxandria',
69 year: 1994,
70 score: 0.7453246116638184
71 }
72]

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1db.embedded_movies.aggregate([
2 {
3 "$vectorSearch": {
4 "index": "vector_index",
5 "path": "plot_embedding_voyage_3_large",
6 "filter": {
7 "$or": [{
8 "genres": { "$ne": "Crime" }
9 }, {
10 "$and": [{
11 "year": { "$lte": 2015 }
12 }, {
13 "genres": { "$eq": "Action" }
14 }]
15 }]
16 },
17 "queryVector": STAR_WARS_EMBEDDING,
18 "numCandidates": 200,
19 "limit": 10
20 }
21 },
22 {
23 "$project": {
24 "_id": 0,
25 "title": 1,
26 "genres": 1,
27 "plot": 1,
28 "released": 1,
29 "score": { $meta: "vectorSearchScore" }
30 }
31 }
32])
1[
2 {
3 plot: "Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.",
4 genres: [ 'Action', 'Adventure', 'Fantasy' ],
5 title: 'Star Wars: Episode IV - A New Hope',
6 released: ISODate('1977-05-25T00:00:00.000Z'),
7 score: 0.79868483543396
8 },
9 {
10 plot: "A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.",
11 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
12 title: 'Dune',
13 released: ISODate('1984-12-14T00:00:00.000Z'),
14 score: 0.7949700355529785
15 },
16 {
17 plot: 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
18 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
19 title: 'Message from Space',
20 released: ISODate('1978-10-30T00:00:00.000Z'),
21 score: 0.7913978099822998
22 },
23 {
24 plot: 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
25 genres: [ 'Action', 'Adventure', 'Sci-Fi' ],
26 title: 'Message from Space',
27 released: ISODate('1978-10-30T00:00:00.000Z'),
28 score: 0.7913978099822998
29 },
30 {
31 plot: 'After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.',
32 genres: [ 'Action', 'Adventure', 'Fantasy' ],
33 title: 'Star Wars: Episode V - The Empire Strikes Back',
34 released: ISODate('1980-06-20T00:00:00.000Z'),
35 score: 0.7809884548187256
36 },
37 {
38 plot: 'After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.',
39 genres: [ 'Action', 'Adventure', 'Fantasy' ],
40 title: 'Star Wars: Episode VI - Return of the Jedi',
41 released: ISODate('1983-05-25T00:00:00.000Z'),
42 score: 0.7784996032714844
43 },
44 {
45 plot: 'Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.',
46 genres: [ 'Action', 'Adventure', 'Fantasy' ],
47 title: 'Star Wars: Episode I - The Phantom Menace',
48 released: ISODate('1999-05-19T00:00:00.000Z'),
49 score: 0.7766742706298828
50 },
51 {
52 plot: 'The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...',
53 genres: [ 'Adventure', 'Family', 'Fantasy' ],
54 title: 'Ewoks: The Battle for Endor',
55 released: ISODate('1985-11-24T00:00:00.000Z'),
56 score: 0.7676119804382324
57 },
58 {
59 plot: 'A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.',
60 genres: [ 'Action', 'Adventure', 'Fantasy' ],
61 title: 'Krull',
62 released: ISODate('1983-07-29T00:00:00.000Z'),
63 score: 0.7624373435974121
64 },
65 {
66 plot: 'An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.',
67 genres: [ 'Action', 'Adventure', 'Fantasy' ],
68 title: 'Starcrash',
69 released: ISODate('1979-03-09T00:00:00.000Z'),
70 score: 0.7582714557647705
71 }
72]
1
2

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

DataService.cs
1namespace query_quick_start;
2
3using MongoDB.Driver;
4using MongoDB.Bson;
5
6public class DataService
7{
8 private const string ConnectionString = "<connection-string>";
9 private static readonly MongoClient Client = new MongoClient(ConnectionString);
10 private static readonly IMongoDatabase Database = Client.GetDatabase("sample_mflix");
11 private static readonly IMongoCollection<BsonDocument> Collection = Database.GetCollection<BsonDocument>("embedded_movies");
12
13 public List<BsonDocument>? PerformVectorQuery()
14 {
15 double[] queryVector = {
16 -0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558,
17 };
18 var filter = Builders<BsonDocument>.Filter.And(
19 Builders<BsonDocument>.Filter.And(
20 Builders<BsonDocument>.Filter.Nin("genres", ["Drama", "Western", "Crime"]),
21 Builders<BsonDocument>.Filter.In("genres", ["Action", "Adventure", "Family"])
22 ),
23 Builders<BsonDocument>.Filter.And(
24 Builders<BsonDocument>.Filter.Gte("year", 1960),
25 Builders<BsonDocument>.Filter.Lte("year", 2000)
26 )
27 );
28
29 var options = new VectorSearchOptions<BsonDocument>()
30 {
31 IndexName = "vector_index",
32 Filter = filter,
33 NumberOfCandidates = 200,
34 };
35
36 var pipeline = new EmptyPipelineDefinition<BsonDocument>()
37 .VectorSearch("plot_embedding_voyage_3_large", queryVector, 10, options)
38 .Project(Builders<BsonDocument>.Projection
39 .Exclude("_id")
40 .Include("title")
41 .Include("genres")
42 .Include("plot")
43 .Include("year")
44 .Meta("score", "vectorSearchScore")
45 );
46 return Collection.Aggregate<BsonDocument>(pipeline).ToList();
47 }
48}

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

DataService.cs
1namespace query_quick_start;
2
3using MongoDB.Driver;
4using MongoDB.Bson;
5
6public class DataService
7{
8 private const string ConnectionString = "<connection-string>";
9 private static readonly MongoClient Client = new MongoClient(ConnectionString);
10 private static readonly IMongoDatabase Database = Client.GetDatabase("sample_mflix");
11 private static readonly IMongoCollection<BsonDocument> Collection = Database.GetCollection<BsonDocument>("embedded_movies");
12
13 public List<BsonDocument>? PerformVectorQuery()
14 {
15 double[] queryVector = {
16 -0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494,
17 };
18 var filter = Builders<BsonDocument>.Filter.Or(
19 Builders<BsonDocument>.Filter.Ne("genres", "Crime"),
20 Builders<BsonDocument>.Filter.And(
21 Builders<BsonDocument>.Filter.Lte("year", 2015),
22 Builders<BsonDocument>.Filter.Eq("genres", "Action")
23 )
24 );
25
26 var options = new VectorSearchOptions<BsonDocument>()
27 {
28 IndexName = "vector_index",
29 Filter = filter,
30 NumberOfCandidates = 200,
31 };
32
33 var pipeline = new EmptyPipelineDefinition<BsonDocument>()
34 .VectorSearch("plot_embedding_voyage_3_large", queryVector, 10, options)
35 .Project(Builders<BsonDocument>.Projection
36 .Exclude("_id")
37 .Include("title")
38 .Include("genres")
39 .Include("plot")
40 .Include("year")
41 .Meta("score", "vectorSearchScore")
42 );
43 return Collection.Aggregate<BsonDocument>(pipeline).ToList();
44 }
45}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4

Program.cs を更新して DataService を初期化し、メソッドを呼び出してクエリを実行します。

Program.cs
1using query_quick_start;
2
3var dataService = new DataService();
4var results = dataService.PerformVectorQuery();
5if (results != null)
6{
7 foreach (var document in results)
8 {
9 Console.WriteLine(document);
10 }
11}
12else
13{
14 Console.WriteLine("The query returned no results.");
15}
5

ファイルを保存し、プロジェクトをコンパイルして実行して、クエリを実行します。

dotnet run query_quick_start.csproj
1{ "plot" : "Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...", "genres" : ["Action", "Adventure", "Comedy"], "title" : "3 Ninjas: High Noon at Mega Mountain", "year" : 1998, "score" : 0.77463436126708984 }
2{ "plot" : "A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...", "genres" : ["Action", "Adventure", "Family"], "title" : "White Wolves: A Cry in the Wild II", "year" : 1993, "score" : 0.77010631561279297 }
3{ "plot" : "A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.", "genres" : ["Action", "Adventure", "Sci-Fi"], "title" : "Space Raiders", "year" : 1983, "score" : 0.75695919990539551 }
4{ "plot" : "Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.", "genres" : ["Adventure", "Family", "Fantasy"], "title" : "The Ewok Adventure", "year" : 1984, "score" : 0.75154352188110352 }
5{ "plot" : "A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.", "genres" : ["Adventure", "Comedy", "Fantasy"], "title" : "Time Bandits", "year" : 1981, "score" : 0.75135993957519531 }
6{ "plot" : "A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.", "genres" : ["Adventure", "Family", "Fantasy"], "title" : "Chitty Chitty Bang Bang", "year" : 1968, "score" : 0.74922609329223633 }
7{ "plot" : "A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.", "genres" : ["Action", "Adventure", "Comedy"], "title" : "Forest Warrior", "year" : 1996, "score" : 0.74737143516540527 }
8{ "plot" : "A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.", "genres" : ["Action", "Adventure", "Comedy"], "title" : "Forest Warrior", "year" : 1996, "score" : 0.74737143516540527 }
9{ "plot" : "A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.", "genres" : ["Action", "Fantasy", "Adventure"], "title" : "Warriors of Virtue", "year" : 1997, "score" : 0.74642133712768555 }
10{ "plot" : "A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...", "genres" : ["Animation", "Adventure", "Fantasy"], "title" : "Taxandria", "year" : 1994, "score" : 0.74532461166381836 }
dotnet run query_quick_start.csproj
1{ "year" : 1977, "plot" : "Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Star Wars: Episode IV - A New Hope", "score" : 0.79868483543395996 }
2{ "plot" : "A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.", "genres" : ["Action", "Adventure", "Sci-Fi"], "title" : "Dune", "year" : 1984, "score" : 0.79497003555297852 }
3{ "plot" : "In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...", "genres" : ["Action", "Adventure", "Sci-Fi"], "title" : "Message from Space", "year" : 1978, "score" : 0.7913978099822998 }
4{ "plot" : "In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...", "genres" : ["Action", "Adventure", "Sci-Fi"], "title" : "Message from Space", "year" : 1978, "score" : 0.7913978099822998 }
5{ "year" : 1980, "plot" : "After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Star Wars: Episode V - The Empire Strikes Back", "score" : 0.78098845481872559 }
6{ "plot" : "After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Star Wars: Episode VI - Return of the Jedi", "year" : 1983, "score" : 0.77849960327148438 }
7{ "plot" : "Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Star Wars: Episode I - The Phantom Menace", "year" : 1999, "score" : 0.77667427062988281 }
8{ "plot" : "The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...", "genres" : ["Adventure", "Family", "Fantasy"], "title" : "Ewoks: The Battle for Endor", "year" : 1985, "score" : 0.76761198043823242 }
9{ "plot" : "A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Krull", "year" : 1983, "score" : 0.76243734359741211 }
10{ "plot" : "An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.", "genres" : ["Action", "Adventure", "Fantasy"], "title" : "Starcrash", "year" : 1978, "score" : 0.75827145576477051 }
1
2

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1package main
2
3import (
4 "context"
5 "fmt"
6 "log"
7
8 "go.mongodb.org/mongo-driver/bson"
9 "go.mongodb.org/mongo-driver/mongo"
10 "go.mongodb.org/mongo-driver/mongo/options"
11)
12
13func main() {
14 ctx := context.Background()
15
16 // Replace the placeholder with your Atlas connection string
17 const uri = "<connection-string>"
18
19 // Connect to your Atlas cluster
20 clientOptions := options.Client().ApplyURI(uri)
21 client, err := mongo.Connect(ctx, clientOptions)
22 if err != nil {
23 log.Fatalf("failed to connect to the server: %v", err)
24 }
25 defer func() { _ = client.Disconnect(ctx) }()
26
27 // Set the namespace
28 coll := client.Database("sample_mflix").Collection("embedded_movies")
29
30 queryVector := [2048]float64{
31 -0.021090532, -0.026399033, -0.024103465, -0.025538195, -0.000549233, 0.011836523, -0.013199517, -0.003766167, -0.005165028, -0.02238179, 0.037876874, 0.010617003, 0.010903949, -0.001354026, 0.006850836, -0.018005863, -0.02195137, 0.019512329, -0.041894119, -0.008357302, 0.027546817, -0.025251249, 0.004340059, -0.02195137, -0.003748232, -0.006205208, 0.021377478, 0.008931194, -0.00173961, -0.009827901, -0.016642869, -0.033572685, -0.026399033, 0.015208139, 0.010114847, -0.0233861, -0.011406104, -0.033142265, -0.008895326, -0.014347301, -0.019081909, -0.049067769, 0.034433521, -0.023673046, 0.004160717, -0.01334299, -0.06714537, 0.032568373, -0.022525262, -0.024677357, 0.011334368, 0.027403345, 0.026399033, -0.016786342, -0.015925504, 0.013916882, -0.005487842, -0.0233861, 0.026542507, -0.052798066, -0.025681669, -0.025394723, 0.014203828, 0.014921193, -0.031564061, 0.010760476, 0.010688739, 0.013916882, -0.037876874, 0.039598551, -0.000816003, 0.003766167, -0.001694775, 0.026972925, -0.009469219, 0.015351612, -0.007245387, 0.028981548, -0.035724778, 0.010688739, 0.001228488, 0.004106915, -0.024677357, 0.028551128, -0.033716157, -0.013486463, 0.018292809, -0.018221073, 0.009612692, -0.003622693, -0.001138817, -0.021234006, -0.045624416, 0.020803586, 0.007675806, -0.009612692, -0.021664424, -0.026685979, -0.025968615, 0.001775478, -0.007496465, 0.02051664, -0.054519743, 0.018221073, 0.014132091, -0.009684428, -0.025825141, -0.014921193, -0.057389203, -0.020660114, -0.028264182, -0.008931194, -0.019942747, -0.003228143, -0.014419037, 0.021234006, -0.004573202, 0.007317123, 0.018651491, -0.016571132, -0.036155198, -0.032855317, 0.000726332, -0.031851009, 0.018938437, 0.021234006, -0.048206929, 0.017934127, -0.013414727, -0.009469219, 0.064849801, 0.006348681, -0.039024659, 0.021377478, -0.022668736, -0.026829453, -0.019081909, 0.027977237, -0.004627005, -0.038450766, 0.004465597, -0.041894119, 0.008213829, 0.03055975, 0.052224174, -0.00277979, -0.032137953, -0.013629936, 0.022094844, -0.005918262, 0.020660114, 0.010617003, -0.020373167, -0.001614071, 0.021090532, -0.005523711, 0.004878082, -0.021090532, 0.029698912, 0.000726332, 0.003371616, -0.022238316, 0.008715985, 0.038737711, 0.013486463, -0.008536644, 0.040172443, 0.017503707, -0.028838074, 0.061693393, -0.003066736, 0.008285566, -0.034576993, 0.01578203, -0.02238179, 0.015925504, 0.066571474, -0.038737711, -0.050215553, 0.009325746, -0.010903949, -0.041607171, -0.006384549, 0.026972925, -0.000119374, -0.003066736, -0.024103465, 0.005093292, 0.028981548, 0.026829453, -0.001703742, 0.043041904, 0.010186584, 0.010688739, 0.004357993, -0.016571132, -0.010545266, -0.033142265, -0.005559579, -0.000365408, -0.00717365, 0.019655801, 0.047633037, 0.044476632, 0.01456251, -0.002977065, 0.025681669, -0.015423348, -0.02051664, -0.019512329, 0.014705983, 0.002977065, 0.03055975, -0.014347301, 0.024390411, 0.005882393, -0.012195205, 0.004071047, -0.028694602, 0.031277116, -0.010114847, 0.005272633, 0.017934127, 0.037589926, -0.046198308, -0.02195137, -0.037876874, 0.021234006, -0.034720469, -0.018005863, 0.03055975, -0.015495085, -0.035150886, 0.004178651, 0.005882393, 0.075753748, 0.00595413, -0.083214343, -0.016284186, 0.022238316, -0.032998793, -0.00491395, -0.009254009, -0.007819279, 0.046198308, -0.008464907, 0.014634247, 0.031707536, -0.00317434, -0.026255561, -0.010617003, -0.033285737, 0.020086221, -0.016858079, -0.012195205, -0.041894119, 0.000721849, 0.038163818, 0.02238179, 0.011406104, 0.010330057, 0.032137953, -0.01047353, 0.039311603, -0.01291257, -0.03099017, -0.018938437, -0.013271254, -0.001820314, -0.005380238, 0.003299879, -0.024533885, -0.001093982, 0.012123469, -0.005236765, 0.014132091, -0.018221073, 0.013629936, 0.022238316, -0.00317434, 0.034003101, 0.019081909, 0.008034488, -0.02912502, 0.026542507, -0.011334368, -0.077475421, 0.038163818, -0.003568891, 0.019081909, 0.019512329, 0.002385239, -0.032568373, -0.020373167, 0.038737711, -0.013773409, 0.01621245, -0.028407656, -0.021090532, -0.004411795, -0.013916882, -0.001533368, 0.004322124, -0.024820831, 0.004627005, -0.004591136, 0.014849456, -0.014275564, -0.020229694, 0.0233861, 0.015566821, 0.022525262, -0.024390411, -0.028694602, 0.001766511, -0.036011726, 0.006456285, -0.011262631, 0.005523711, 0.012266942, -0.019225383, -0.015423348, 0.011836523, -0.011334368, -0.009827901, -0.011119158, 0.007030177, 0.00277979, 0.004537334, -0.016571132, 0.013127781, -0.013701673, -0.016571132, 0.002941197, 0.000959476, -0.004483532, 0.010760476, 0.043041904, -0.032568373, -0.015423348, 0.006169339, -0.02094706, -0.050215553, 0.012769097, 0.015495085, 0.001318158, 0.00164994, -0.045337472, 0.001533368, 0.005595447, 0.039311603, -0.030703224, 0.023242628, -0.008787721, -0.021234006, -0.021234006, -0.001524401, 0.007281255, 0.01334299, 0.00164994, -0.005451974, -0.011047422, -0.021234006, -0.033572685, -0.015423348, -0.005236765, 0.025681669, -0.02051664, -0.024103465, -0.021377478, -0.00738886, -0.031707536, 0.017790653, -0.026829453, 0.007783411, -0.003335747, 0.024677357, 0.006384549, 0.035724778, -0.004017244, -0.018651491, -0.014060355, -0.029842386, -0.012553888, 0.006994309, -0.00317434, 0.018292809, 0.019942747, -0.01169305, 0.002456975, 0.010330057, -0.031707536, 0.00799862, -0.019655801, -0.006205208, -0.012769097, -0.035294361, 0.026112087, -0.004483532, 0.02094706, 0.019081909, 0.001676841, -0.040746335, -0.004035179, -0.014992929, 0.004375927, -0.049928606, -0.02051664, 0.004268322, 0.015351612, -0.037016038, -0.001452664, -0.021234006, -0.005738921, -0.051650282, -0.008285566, 0.012840834, -0.015925504, 0.018794963, -0.001228488, -0.035868254, -0.00347922, -0.003264011, 0.002528712, 0.01477772, -0.010545266, 0.018221073, 0.018149335, -0.028838074, -0.012984307, -0.037302982, -0.041607171, -0.043328848, -0.019799275, -0.019225383, -0.011047422, 0.011908259, 0.021664424, -0.012553888, 0.004662873, 0.005451974, -0.024533885, 0.0067791, 0.022812208, -0.037589926, -0.031564061, 0.007101914, -0.00760407, -0.025107777, 0.015566821, 0.020803586, -0.033572685, 0.062841177, 0.034146577, -0.007532333, -0.001865149, -0.023673046, 0.032424901, 0.018508019, -0.005703052, -0.015853768, 0.019655801, 0.042181063, 0.006671495, -0.004573202, 0.024390411, 0.009756165, -0.00029143, 0.000107605, 0.032711845, -0.005523711, -0.015566821, 0.009110536, 0.017216761, 0.006241076, -0.003945508, 0.007783411, 0.024246939, 0.048206929, 0.00277979, -0.002367305, -0.05107639, -0.016284186, -0.016929815, 0.016858079, 0.000703914, -0.021234006, 0.021234006, -0.014634247, 0.001389895, 0.008321434, -0.016499396, 0.014921193, 0.025394723, 0.035437834, 0.013486463, -0.022668736, -0.012338678, -0.034003101, -0.005559579, -0.008106225, 0.023959992, -0.019368855, 0.024533885, -0.000600793, 0.009756165, -0.001936886, -0.014490774, 0.018077599, 0.004447663, 0.011262631, -0.003658562, 0.043328848, -0.018938437, 0.00799862, -0.018221073, 0.041320227, 0.000363166, -0.003730298, 0.002851526, -0.024103465, 0.003515089, -0.0135582, -0.003497155, -0.006814968, 0.014060355, 0.027116399, -0.003192274, 0.011406104, 0.042468011, -0.036442146, -0.007245387, 0.032424901, -0.038737711, 0.008680117, -0.035581306, 0.027546817, 0.021664424, -0.000757717, -0.022238316, 0.018221073, -0.006205208, 0.005093292, 0.001264356, -0.002116227, 0.001098465, 0.017431971, -0.042181063, 0.010760476, 0.033285737, 0.002708053, -0.007352991, -0.009827901, -0.031994481, -0.020803586, 0.009971374, -0.014849456, -0.003658562, 0.024964303, -0.001793413, 0.021090532, 0.01578203, 0.012984307, 0.006922573, -0.032711845, -0.013701673, 0.00390964, 0.017503707, -0.015351612, 0.006922573, 0.028694602, 0.012266942, -0.027259871, 0.007675806, -0.002295568, -0.020086221, 0.00595413, -0.027833764, 0.001551302, 0.008644248, -0.002187963, 0.00040576, 0.024964303, 0.013916882, -0.015925504, 0.014347301, -0.011549577, 0.018938437, -0.032424901, 0.003730298, 0.003281945, 0.032998793, 0.005595447, 0.025681669, 0.011047422, 0.026399033, 0.02912502, -0.006241076, 0.004627005, 0.024390411, 0.001542335, -0.034576993, 0.011477841, -0.00491395, -0.014347301, 0.023529572, -0.004770477, -0.014921193, -0.028264182, 0.02812071, 0.00164994, 0.008680117, -0.005416106, 0.035581306, -0.02812071, 0.006097603, -0.016355922, -0.010114847, 0.033142265, -0.021807898, 0.001228488, -0.002170029, -0.032711845, 0.018149335, 0.014132091, 0.03055975, 0.031133642, -0.011979996, 0.008967063, -0.013486463, -0.02812071, 0.052224174, 0.004124849, -0.008715985, -0.034863941, 0.025251249, 0.07977099, -0.000072297, -0.014705983, 0.033142265, 0.024103465, -0.004232454, -0.007496465, -0.024246939, -0.029698912, -0.009469219, 0.010114847, 0.001201586, 0.00860838, 0.012051732, -0.006025866, 0.014490774, 0.014992929, 0.01169305, -0.003192274, 0.005308501, 0.0045194, 0.017575443, 0.001022245, -0.018794963, -0.001847215, 0.011119158, 0.02051664, -0.006886704, 0.010330057, -0.003353682, 0.018794963, 0.013773409, 0.026399033, 0.007962752, -0.018221073, -0.012553888, -0.003586825, -0.002170029, 0.047633037, 0.011908259, 0.007209518, 0.045624416, 0.028694602, 0.004357993, 0.023959992, 0.004232454, 0.009182272, 0.003012933, 0.035294361, -0.055954475, 0.014849456, 0.012553888, 0.004340059, -0.000511123, -0.024390411, 0.011406104, 0.013127781, 0.013629936, -0.011406104, 0.002582514, -0.004555268, 0.005559579, 0.000569409, 0.017934127, -0.014060355, 0.02912502, 0.003819969, 0.011190895, -0.011262631, 0.017001551, 0.012553888, -0.02238179, 0.024246939, 0.032281429, 0.032711845, -0.016714605, -0.021520952, 0.016355922, -0.011334368, -0.003891705, -0.008572512, -0.016929815, 0.0135582, -0.057963096, 0.015566821, 0.001856182, -0.002456975, -0.000766684, 0.005380238, 0.000923607, 0.035581306, 0.005272633, -0.009612692, 0.018651491, -0.023959992, -0.001416796, 0.033285737, -0.002725987, 0.024533885, -0.010186584, 0.003802035, -0.029268494, -0.011764786, 0.003837903, 0.022955682, 0.053945851, -0.002232799, 0.019512329, 0.014419037, 0.028407656, 0.004985687, 0.00210726, 0.005774789, 0.032568373, -0.024964303, 0.019655801, -0.012123469, 0.031994481, 0.015638558, 0.038450766, -0.011979996, 0.033716157, 0.019368855, 0.017431971, 0.022668736, 0.015423348, -0.001927919, -0.001102949, 0.028694602, -0.013701673, -0.036155198, -0.010688739, 0.000535782, -0.021807898, -0.005200896, -0.040459387, 0.007137782, -0.006492154, -0.00277979, 0.020803586, 0.027833764, -0.000780134, 0.000600793, -0.025538195, -0.011764786, 0.021090532, 0.028694602, -0.016929815, -0.025251249, 0.029268494, -0.013271254, 0.014634247, 0.000376617, -0.025251249, -0.026255561, -0.037302982, 0.003138472, -0.024677357, -0.019799275, 0.025825141, -0.040746335, 0.002510778, -0.031851009, -0.014347301, -0.00158717, -0.046772201, -0.028838074, 0.006635627, -0.001058113, 0.014132091, -0.00286946, 0.019368855, 0.007281255, 0.036155198, 0.065710634, 0.018794963, -0.029268494, 0.003461286, 0.012984307, 0.006133471, 0.003497155, 0.046198308, -0.014132091, -0.010186584, 0.028981548, -0.000286946, -0.003102604, 0.011190895, 0.014490774, -0.020660114, -0.00347922, -0.004842214, -0.000506639, 0.002600448, 0.017073289, -0.011836523, -0.026685979, -0.023959992, 0.023673046, -0.006958441, 0.040172443, -0.031133642, 0.009182272, -0.015638558, -0.002421107, 0.004555268, 0.014705983, -0.028407656, -0.014921193, -0.015710294, -0.008751853, -0.006420417, -0.038450766, -0.011908259, 0.006133471, 0.002474909, -0.008070357, -0.01025832, -0.011119158, 0.004465597, 0.010903949, 0.009074667, 0.030703224, -0.019368855, -0.007891015, 0.007675806, -0.005093292, 0.023099154, 0.022094844, 0.00738886, 0.007066045, -0.023242628, -0.020660114, 0.009397482, -0.006635627, 0.009540955, 0.006348681, -0.013773409, -0.000186067, -0.021234006, -0.017145025, -0.007030177, 0.010114847, 0.024390411, -0.024964303, -0.041033279, 0.0135582, 0.014060355, 0.008715985, 0.018794963, -0.039598551, -0.015208139, 0.027977237, 0.020086221, 0.012195205, -0.010760476, -0.025538195, 0.025394723, 0.012697361, -0.053371958, -0.008249698, 0.005846525, -0.045624416, -0.027977237, -0.012410415, -0.02195137, -0.022955682, 0.011477841, 0.026972925, -0.031420588, -0.012051732, -0.015925504, -0.004322124, -0.017145025, 0.012840834, 0.01578203, -0.010186584, -0.00091464, -0.028264182, 0.00369443, -0.029985858, -0.009899638, 0.018794963, 0.053945851, 0.007317123, -0.020086221, 0.008967063, -0.001506467, -0.006850836, 0.011477841, -0.003120538, -0.005631316, -0.027977237, 0.01047353, 0.003120538, -0.001354026, -0.004160717, -0.004698741, -0.049067769, 0.021807898, -0.037589926, 0.03672909, -0.004878082, -0.006241076, 0.000049879, 0.014203828, -0.027259871, 0.004196586, -0.002421107, 0.008106225, -0.00760407, -0.003802035, -0.016140714, 0.038737711, -0.010043111, -0.037589926, -0.062267285, -0.001506467, -0.006384549, -0.012697361, -0.011190895, -0.01578203, 0.014132091, -0.02238179, -0.024677357, 0.011621314, -0.028407656, 0.010688739, 0.039311603, 0.009254009, -0.009612692, -0.040459387, 0.021234006, 0.007926884, -0.057102256, -0.045624416, 0.003497155, -0.003120538, -0.015853768, -0.006528022, 0.011334368, -0.008177961, -0.033716157, 0.010114847, 0.035868254, -0.021807898, -0.010975685, -0.039024659, 0.021234006, 0.001990688, -0.009756165, -0.003819969, -0.033142265, -0.035150886, 0.028407656, 0.007711674, 0.018364545, 0.005416106, 0.010545266, -0.032281429, 0.01291257, 0.003102604, -0.009756165, 0.05107639, -0.001080531, -0.043615796, 0.025968615, 0.012697361, 0.024820831, 0.024246939, -0.020086221, -0.012195205, 0.00760407, 0.009540955, -0.003802035, 0.043328848, -0.010043111, 0.003891705, -0.054519743, 0.043041904, -0.032711845, 0.024820831, 0.018651491, -0.008357302, 0.009540955, -0.003156406, -0.019081909, -0.025825141, -0.02912502, 0.026255561, -0.017216761, 0.010401793, -0.028551128, -0.005200896, 0.012625624, -0.008142093, 0.039311603, -0.00082497, -0.003784101, 0.037876874, 0.006599758, -0.021520952, 0.047633037, 0.012410415, -0.01477772, 0.023529572, 0.004985687, -0.031707536, 0.007675806, -0.017934127, -0.034863941, 0.018794963, -0.011119158, -0.027546817, 0.009612692, 0.00760407, 0.057102256, 0.006241076, 0.007281255, -0.007675806, -0.008285566, 0.012553888, -0.007245387, 0.016284186, -0.024964303, 0.007030177, -0.011836523, -0.045050524, 0.021090532, -0.021664424, 0.00369443, 0.037016038, -0.010186584, -0.00656389, 0.016355922, 0.019225383, 0.009002931, -0.008034488, -0.004555268, 0.046772201, -0.014347301, 0.014347301, -0.023959992, 0.017790653, 0.031133642, -0.025825141, 0.035581306, -0.012769097, 0.017360235, 0.024677357, 0.000046517, 0.010903949, 0.011262631, -0.000573892, 0.026829453, -0.024820831, -0.001309191, 0.008177961, -0.002143128, -0.018651491, -0.026685979, -0.040172443, -0.018651491, 0.007568201, -0.018794963, 0.003281945, -0.014347301, 0.005738921, -0.020373167, -0.02051664, -0.028551128, -0.040172443, -0.017718917, 0.046198308, 0.003802035, -0.005523711, 0.07345818, 0.000412485, -0.025968615, 0.024246939, -0.024964303, 0.024820831, 0.005882393, 0.011190895, 0.020086221, -0.029411966, -0.029842386, 0.006922573, -0.004286256, 0.0233861, -0.0135582, 0.000551474, 0.026255561, 0.019799275, 0.003568891, -0.025681669, -0.009469219, -0.002636316, 0.013486463, 0.050215553, -0.040459387, -0.003622693, 0.019225383, -0.015853768, -0.017001551, 0.028407656, 0.02812071, 0.01477772, -0.007209518, 0.046198308, 0.024246939, 0.035868254, -0.019225383, -0.030272804, 0.006599758, 0.000473013, -0.018364545, 0.033429209, -0.0233861, 0.021664424, 0.028694602, -0.009684428, -0.002815658, 0.015136402, 0.006994309, 0.017360235, -0.027116399, 0.042181063, -0.018794963, -0.037589926, -0.018508019, -0.012266942, -0.00277979, -0.01334299, -0.020373167, -0.004949819, -0.018651491, 0.026829453, -0.011979996, 0.00799862, 0.040459387, -0.00738886, 0.008249698, 0.017718917, -0.042754956, -0.011119158, -0.043615796, -0.009325746, -0.009612692, -0.008285566, -0.008213829, 0.012625624, 0.000919124, -0.041033279, 0.000636661, -0.045911364, -0.001909984, -0.016642869, 0.013414727, 0.03055975, -0.013414727, 0.010186584, 0.056241419, -0.008321434, -0.000200638, 0.006205208, 0.012625624, 0.009756165, -0.035294361, 0.034003101, -0.023529572, 0.031564061, -0.026399033, 0.029268494, 0.001183652, 0.01334299, 0.004035179, -0.00491395, -0.002241766, -0.011764786, 0.029268494, -0.011621314, 0.037302982, -0.020086221, 0.018651491, -0.01578203, -0.025825141, 0.002528712, 0.057102256, 0.046198308, -0.006169339, 0.008249698, 0.009397482, -0.008142093, -0.037876874, -0.041607171, -0.01169305, -0.013773409, -0.020086221, -0.038737711, -0.019799275, -0.035437834, 0.019368855, -0.001246422, -0.013845146, -0.037876874, -0.006814968, -0.003066736, 0.003730298, 0.016499396, 0.012840834, 0.02051664, -0.006994309, 0.009182272, -0.00738886, -0.000193913, -0.037016038, 0.007281255, -0.016427658, -0.003568891, 0.02912502, 0.021807898, 0.02912502, 0.004124849, -0.012625624, 0.02195137, -0.036155198, 0.011334368, 0.018651491, 0.040459387, 0.006205208, 0.015064666, -0.023959992, 0.017360235, -0.000567167, 0.032998793, -0.023099154, 0.075753748, -0.038737711, -0.005057423, -0.019799275, 0.014849456, -0.050215553, -0.001111916, -0.006169339, 0.009469219, -0.019081909, -0.013127781, -0.028838074, -0.013414727, -0.008213829, 0.006312812, -0.008177961, -0.021664424, -0.010832212, -0.012697361, 0.014634247, 0.004393861, -0.045337472, -0.010975685, -0.030703224, -0.003228143, -0.014849456, -0.034003101, 0.009612692, -0.004806346, -0.006492154, 0.018938437, 0.00277979, 0.023816518, -0.003407484, -0.01169305, 0.006276944, -0.024820831, 0.00189205, 0.006814968, -0.019655801, 0.035294361, 0.009038799, 0.006922573, 0.011334368, -0.018651491, -0.009899638, 0.029985858, -0.008285566, -0.013845146, 0.032424901, -0.024533885, -0.024677357, 0.031420588, 0.003604759, 0.004232454, 0.01578203, -0.025107777, 0.003784101, 0.006276944, -0.010832212, 0.009074667, -0.040172443, 0.048780821, 0.02094706, -0.009110536, 0.008680117, -0.014132091, 0.023816518, 0.012051732, -0.012123469, -0.032998793, -0.032424901, -0.021664424, -0.025538195, -0.01047353, 0.009002931, -0.039311603, -0.004806346, 0.023673046, -0.012123469, -0.006850836, -0.030272804, 0.043615796, 0.002456975, 0.001273323, -0.007711674, -0.008177961, 0.06714537, -0.043615796, 0.017216761, 0.00882359, -0.005416106, -0.014060355, 0.034146577, -0.022812208, -0.009899638, -0.00390964, -0.032137953, 0.007245387, 0.047633037, -0.007352991, 0.006097603, -0.019225383, -0.027833764, -0.010545266, 0.002905329, -0.002797724, 0.038450766, -0.013629936, -0.008106225, -0.001143301, -0.000014361, -0.043328848, 0.029698912, 0.027690291, 0.002143128, 0.012051732, -0.02812071, 0.024677357, -0.012984307, 0.008715985, -0.005523711, 0.039024659, -0.020373167, -0.028838074, 0.026972925, 0.018364545, -0.010114847, -0.011406104, 0.033572685, -0.028838074, 0.024677357, -0.011836523, -0.009612692, -0.03672909, 0.025107777, -0.025251249, -0.009182272, 0.002618382, 0.030416278, -0.003210209, 0.033859629, -0.015208139, -0.015279875, 0.010975685, 0.014132091, -0.010545266, -0.002600448, 0.003945508, -0.001990688, -0.008859458, 0.024533885, 0.027116399, -0.005487842, -0.028551128, 0.008321434, 0.016714605, 0.010617003, 0.043328848, 0.025251249, -0.033429209, 0.005667184, -0.012840834, 0.037589926, -0.012482151, 0.002546646, 0.01477772, -0.003120538, 0.012984307, -0.054232799, -0.013199517, -0.029985858, -0.023673046, -0.014992929, -0.010760476, 0.0233861, -0.02912502, -0.020803586, -0.010545266, 0.022238316, 0.005021555, 0.041033279, 0.016140714, -0.006097603, 0.015351612, -0.017790653, -0.007675806, -0.032281429, -0.012338678, 0.02955544, -0.016427658, 0.039885495, 0.001192619, -0.006241076, -0.000663563, -0.008070357, -0.001452664, 0.025681669, -0.020803586, -0.010401793, 0.001443697, 0.012410415, 0.007926884, -0.034003101, 0.017360235, 0.000999828, 0.019799275, -0.001102949, 0.005918262, 0.010545266, -0.023529572, 0.016714605, 0.016571132, 0.003604759, 0.016140714, -0.020660114, -0.007101914, 0.014132091, -0.035437834, -0.018938437, 0.019225383, -0.006886704, -0.03629867, 0.010545266, -0.017216761, 0.005595447, -0.022812208, 0.009971374, 0.003371616, -0.022955682, -0.013701673, -0.019368855, -0.022238316, 0.004627005, 0.008213829, 0.002600448, 0.012769097, -0.027116399, 0.015279875, -0.017073289, -0.019512329, -0.010043111, 0.003120538, 0.0045194, -0.024246939, 0.010903949, 0.001667874, -0.008895326, 0.031277116, -0.016571132, -0.012266942, 0.006348681, 0.048493877, -0.010186584, 0.001506467, 0.022955682, -0.012625624, 0.018938437, -0.004698741, -0.009002931, 0.008249698, 0.035724778, 0.002887394, -0.00399931, 0.007747543, -0.000780134, -0.001389895, -0.003138472, -0.016284186, -0.041033279, -0.018364545, -0.001847215, -0.011190895, 0.006061735, -0.044189688, 0.033859629, -0.010043111, 0.040172443, -0.025251249, -0.006241076, -0.01621245, -0.028694602, -0.001345059, -0.021377478, 0.037876874, 0.007675806, 0.006528022, 0.019942747, -0.006133471, 0.014275564, -0.005380238, -0.043328848, -0.05825004, 0.019512329, -0.00090119, -0.018364545, -0.023099154, -0.003407484, 0.026829453, -0.06542369, -0.024677357, 0.011262631, -0.002618382, -0.013916882, 0.031133642, -0.016427658, -0.017934127, 0.020086221, -0.009827901, 0.009899638, 0.011621314, -0.005308501, 0.021377478, -0.011621314, 0.009971374, -0.037876874, -0.013916882, 0.014419037, -0.001748577, 0.014132091, -0.026972925, 0.002725987, -0.03672909, -0.004017244, 0.005738921, 0.001748577, -0.014921193, -0.013127781, 0.033572685, -0.022094844, -0.038163818, -0.030129332, 0.005057423, 0.034576993, 0.028264182, 0.029698912, -0.003443352, 0.022238316, -0.026255561, -0.029842386, 0.001883083, -0.006241076, -0.032711845, 0.008429039, 0.019799275, 0.015710294, -0.019368855, -0.00882359, -0.007101914, -0.013414727, -0.004698741, 0.01477772, -0.015351612, -0.018508019, 0.034290049, -0.012984307, 0.008859458, -0.010688739, -0.000573892, 0.028694602, 0.002313502, 0.023959992, -0.013199517, -0.004770477, -0.035294361, 0.003228143, 0.004949819, -0.041033279, -0.015638558, 0.02812071, 0.009612692, -0.010760476, -0.005057423, 0.010043111, -0.035868254, -0.003192274, 0.016427658, -0.007711674, 0.012051732, -0.013773409, 0.034720469, 0.00760407, 0.009469219, 0.012840834, -0.007962752, -0.024677357, 0.006348681, -0.01334299, -0.00308467, 0.012984307, 0.015208139, 0.02955544, 0.002116227, 0.000403518, -0.02195137, -0.015136402, 0.002905329, 0.008321434, -0.028981548, -0.035294361, -0.024533885, 0.002994999, -0.017073289, -0.021664424, 0.013414727, 0.006384549, -0.024964303, 0.018508019, 0.002941197, 0.01047353, -0.022668736, 0.00421452, -0.034433521, 0.005380238, -0.018938437, 0.017001551, 0.019081909, -0.002636316, -0.006456285, 0.008644248, 0.008859458, 0.011190895, -0.00760407, 0.006707363, 0.007066045, -0.017718917, 0.012195205, -0.037589926, -0.001013278, -0.002456975, -0.003658562, 0.016499396, -0.00286946, 0.002851526, -0.013414727, 0.027977237, -0.040459387, -0.000515606, 0.017431971, -0.00882359, 0.029985858, -0.007532333, -0.01169305, -0.011836523, 0.022525262, 0.004627005, 0.027403345, -0.010688739, -0.011334368, -0.031564061, -0.018221073, 0.023959992, -0.016858079, 0.045624416, 0.017288497, -0.023529572, -0.016786342, 0.042181063, 0.003748232, -0.017288497, -0.008142093, -0.004268322, 0.040172443, -0.019368855, 0.006671495, -0.001488532, 0.042754956, -0.020229694, -0.028694602, -0.041033279, 0.01047353, 0.004286256, 0.004411795, -0.019081909, 0.020803586, 0.03672909, -0.008142093, -0.008751853, 0.001640973, -0.014347301, -0.038450766, 0.000522331, -0.020229694, -0.018508019, 0.035581306, 0.050789446, 0.055093635, -0.021807898, 0.038163818, -0.011262631, 0.025251249, -0.034290049, 0.045050524, 0.0067791, -0.02094706, -0.048206929, 0.008859458, 0.007137782, -0.024677357, 0.012769097, 0.006025866, -0.035294361, 0.009612692, -0.04476358, 0.007675806, 0.037876874, 0.005236765, 0.001156751, 0.012625624, 0.01025832, 0.023529572, 0.015423348, 0.004160717, -0.021664424, -0.017862389, 0.015925504, 0.041033279, 0.023242628, 0.019512329, 0.037876874, -0.018005863, -0.006635627, 0.001981721, 0.016571132, 0.009540955, 0.010114847, 0.008715985, 0.006599758, 0.012410415, 0.005236765, -0.014992929, 0.03099017, -0.002797724, -0.039885495, 0.05825004, 0.000159165, 0.016140714, 0.043041904, -0.000887739, 0.008034488, 0.024964303, -0.028838074, -0.015638558, 0.009182272, -0.033859629, -0.001963787, -0.008070357, -0.009612692, -0.012410415, 0.003676496, -0.047633037, 0.005236765, 0.032711845, 0.002439041, 0.017073289, -0.011621314, -0.011764786, -0.018651491, 0.003927574, 0.002456975, -0.019225383, 0.018938437, 0.046198308, 0.019081909, -0.045624416, -0.015423348, 0.009182272, 0.020086221, 0.008393171, -0.003855837, -0.019942747, -0.02094706, 0.000883256, 0.015064666, -0.010688739, 0.011119158, 0.015495085, 0.014490774, -0.022238316, 0.012051732, 0.012769097, -0.019081909, -0.005344369, -0.011621314, 0.017145025, -0.008249698, -0.005344369, 0.022812208, 0.002286601, -0.009002931, 0.028407656, -0.001865149, -0.013701673, -0.013845146, -0.006492154, 0.022812208, -0.030416278, -0.035294361, -0.042754956, -0.016284186, 0.007137782, 0.002510778, 0.008572512, -0.013701673, 0.00656389, -0.006671495, 0.012697361, -0.022238316, -0.001856182, 0.006276944, 0.006599758, 0.008680117, -0.006133471, 0.006958441, -0.023816518, 0.008177961, 0.009254009, 0.003335747, -0.006635627, -0.015853768, 0.007532333, -0.048206929, -0.05825004, -0.025394723, -0.031420588, -0.001049146, 0.021377478, -0.023816518, -0.046198308, 0.026112087, 0.0045194, -0.028694602, -0.007747543, -0.024533885, -0.024677357, -0.032281429, 0.018794963, -0.032711845, -0.009684428, 0.011190895, -0.001380928, 0.015279875, -0.025107777, -0.005738921, -0.004340059, -0.002170029, -0.017718917, -0.020373167, 0.010186584, -0.009971374, -0.025394723, 0.003622693, -0.048493877, 0.015638558, -0.036155198, -0.016427658, -0.000600793, 0.003281945, 0.022094844, -0.009110536, -0.017145025, -0.023242628, -0.014921193, 0.023673046, 0.02195137, -0.025394723, 0.003371616, -0.032998793, -0.000959476, -0.037589926, -0.013271254, -0.04476358, -0.015423348, -0.018651491, -0.049067769, 0.033429209, -0.002089326, -0.033716157, -0.000932575, -0.001080531, 0.036155198, -0.004106915, 0.005272633, -0.02195137, -0.010043111, -0.027403345, -0.035868254, 0.006814968, 0.039598551, 0.037302982, -0.041320227, -0.025394723, -0.025394723, -0.000699431, 0.003604759, 0.016355922, -0.00799862, -0.006994309, 0.035150886, 0.020229694, -0.007747543, 0.017647181, 0.026399033, -0.030416278, -0.011908259, 0.026542507, -0.012195205, 0.034146577, -0.006169339, -0.008859458, 0.0045194, 0.019799275, -0.031277116, -0.022812208, 0.007066045, 0.039885495, 0.001264356, -0.026542507, -0.016355922, 0.002214865, -0.018938437, -0.02955544, -0.008070357, -0.006420417, -0.001389895, 0.002241766, -0.018292809, 0.016355922, -0.002134161, 0.037302982, 0.00180238, -0.013199517, -0.020086221, -0.011621314, 0.021377478, -0.005272633, -0.02195137, -0.017216761, 0.037876874, 0.033142265, 0.041607171, -0.011477841, 0.031133642, -0.045050524, -0.003981376, -0.025394723, -0.031707536, 0.024533885, 0.032568373, 0.028694602, -0.021090532, -0.019942747, 0.054806691, -0.004483532, -0.020086221, -0.01599724, 0.018651491, 0.020373167, 0.000504397, -0.007424728, -0.063702017, -0.014203828, 0.030846696, -0.006599758, -0.027259871, -0.024103465, -0.020660114, -0.004985687, 0.005559579, -0.034146577, -0.011549577, -0.00173961, 0.008321434, 0.007030177, -0.015638558,
32 }
33
34 genresFilterCondition := bson.D{
35 {"$and", bson.A{
36 bson.D{{"genres", bson.D{{"$nin", bson.A{"Drama", "Western", "Crime"}}}}},
37 bson.D{{"genres", bson.D{{"$in", bson.A{"Action", "Adventure", "Family"}}}}},
38 }}}
39
40 yearFilterCondition := bson.D{
41 {"$and", bson.A{
42 bson.D{{"year", bson.D{{"$gte", 1960}}}},
43 bson.D{{"year", bson.D{{"$lte", 2000}}}},
44 }},
45 }
46
47 filter := bson.D{{"$and", bson.A{
48 genresFilterCondition, yearFilterCondition,
49 }},
50 }
51
52 vectorSearchStage := bson.D{
53 {"$vectorSearch", bson.D{
54 {"index", "vector_index"},
55 {"path", "plot_embedding_voyage_3_large"},
56 {"filter", filter},
57 {"queryVector", queryVector},
58 {"numCandidates", 200},
59 {"limit", 10},
60 }},
61 }
62
63 projectStage := bson.D{
64 {"$project", bson.D{
65 {"_id", 0},
66 {"plot", 1},
67 {"title", 1},
68 {"genres", 1},
69 {"year", 1},
70 {"score", bson.D{{"$meta", "vectorSearchScore"}}},
71 }}}
72
73 cursor, err := coll.Aggregate(ctx, mongo.Pipeline{vectorSearchStage, projectStage})
74 if err != nil {
75 log.Fatalf("failed to retrieve data from the server: %v", err)
76 }
77 // display the results
78 type ProjectedMovieResult struct {
79 Title string `bson:"title"`
80 Plot string `bson:"plot"`
81 Genres []string `bson:"genres"`
82 Year int32 `bson:"year"`
83 Score float64 `bson:"score"`
84 }
85
86 var results []ProjectedMovieResult
87 if err = cursor.All(ctx, &results); err != nil {
88 log.Fatalf("failed to unmarshal results to ProjectedMovieResult objects: %v", err)
89 }
90 for _, result := range results {
91 fmt.Printf("Title: %v \nPlot: %v \nGenres: %v \nYear: %v \nScore: %v \n\n", result.Title, result.Plot, result.Genres, result.Year, result.Score)
92 }
93}

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1package main
2
3import (
4 "context"
5 "fmt"
6 "log"
7
8 "go.mongodb.org/mongo-driver/bson"
9 "go.mongodb.org/mongo-driver/mongo"
10 "go.mongodb.org/mongo-driver/mongo/options"
11)
12
13func main() {
14 ctx := context.Background()
15
16 // Replace the placeholder with your Atlas connection string
17 const uri = "<connection-string>"
18
19 // Connect to your Atlas cluster
20 clientOptions := options.Client().ApplyURI(uri)
21 client, err := mongo.Connect(ctx, clientOptions)
22 if err != nil {
23 log.Fatalf("failed to connect to the server: %v", err)
24 }
25 defer func() { _ = client.Disconnect(ctx) }()
26
27 // Set the namespace
28 coll := client.Database("sample_mflix").Collection("embedded_movies")
29
30 queryVector := [2048]float64{
31 -0.025189938, 0.014741838, -0.013024342, -0.0197512, 0.011235285, 0.004651551, 0.043509893, 0.003112961, 0.013310592, -0.033348043, 0.037212405, -0.021039322, -0.026048684, 0.012809656, 0.029483676, 0.003578116, -0.044654887, 0.032632418, 0.014312465, -0.058967352, 0.025333062, -0.055246111, 0.02189807, -0.017604331, -0.002880384, 0.045227386, 0.004794675, 0.017604331, 0.023186192, -0.054673612, -0.011306847, -0.012523406, -0.012380281, 0.002540462, 0.015958399, -0.042364895, -0.001467028, -0.020180576, -0.058108605, -0.035065539, 0.010090288, -0.033348043, 0.058394853, -0.013883091, 0.002048471, -0.020753073, -0.029769925, 0.031916797, -0.014741838, -0.040933646, -0.004096943, 0.020753073, -0.002540462, 0.028052431, -0.02404494, 0.006547953, -0.003578116, 0.003757022, 0.019178702, -0.037784904, -0.02833868, 0.01753277, 0.029769925, 0.017747456, -0.031344298, 0.022899942, 0.006333265, 0.010376536, -0.024474313, -0.012094032, -0.004651551, 0.007764512, 0.017962143, 0.013811528, 0.037212405, -0.03148742, 0.000666424, 0.024474313, -0.021325571, 0.041219898, 0.011235285, 0.046658635, 0.019035578, 0.020753073, 0.010662786, -0.001726441, -0.012738093, -0.027193682, -0.014598713, -0.013167467, 0.013596841, 0.001932183, -0.010304974, -0.007478263, 0.005689205, 0.002987727, 0.005724986, 0.002325775, 0.002415228, -0.003828584, -0.029340552, -0.017318081, -0.070417322, 0.003810694, -0.013453716, -0.001628043, -0.027909305, 0.014026215, 0.009589351, 0.004902019, 0.028768053, -0.005259831, -0.010448099, 0.025189938, 0.038357403, 0.048662379, 0.039788652, 0.010448099, 0.001574371, 0.020323699, 0.005510299, 0.026907433, 0.043223642, -0.001153942, -0.010233412, 0.048376128, -0.056104861, 0.006691077, 0.015672149, -0.015028087, 0.036210533, -0.009231539, 0.010519661, 0.022899942, 0.025762435, -0.009052633, -0.0301993, 0.032203045, -0.00522405, 0.029626802, -0.02433119, -0.025619311, 0.016674021, 0.02404494, -0.009589351, -0.026334934, -0.04436864, -0.014455589, 0.02619181, 0.017604331, 0.02189807, -0.007728731, -0.021611821, -0.03363429, 0.008480135, -0.027479932, 0.025046812, -0.006047016, 0.020753073, 0.01016185, -0.034063663, 0.029483676, -0.019035578, 0.041506145, 0.013453716, -0.009159978, 0.007549825, 0.025189938, 0.005152487, -0.009446226, -0.009016853, 0.021325571, 0.030771798, -0.046944883, 0.001314958, 0.021182448, 0.047231134, -0.007048889, -0.030771798, -0.025905561, -0.000612752, -0.023186192, 0.011378409, 0.035065539, 0.007979199, 0.023901815, -0.004973582, 0.005188268, -0.046944883, 0.009374664, 0.047231134, 0.058967352, 0.043509893, 0.011449971, 0.017174957, -0.024188064, -0.025476186, -0.02833868, 0.033061791, 0.015314337, -0.018749328, 0.013382155, 0.007048889, 0.005975454, 0.005295612, -0.013310592, -0.022756819, -0.012523406, -0.03363429, -0.014527151, 0.011449971, 0.01202247, 0.044941138, -0.012594969, 0.002862493, 0.000572499, 0.030628674, -0.0098756, 0.020466823, 0.059539851, -0.00370335, 0.007335138, 0.023901815, 0.023758691, -0.005903892, 0.003918037, 0.013310592, 0.010090288, -0.012809656, -0.010376536, -0.01109216, -0.008086543, 0.012809656, -0.019894326, 0.012738093, 0.056391109, 0.029340552, -0.04436864, -0.001619098, 0.042364895, -0.027623056, 0.011593096, -0.031916797, -0.0301993, 0.032203045, -0.003757022, 0.017174957, 0.033491168, 0.003900147, 0.002325775, 0.006726858, 0.020180576, 0.017389644, 0.009088415, 0.018319955, -0.003631788, 0.00586811, -0.006691077, -0.014240902, -0.009052633, 0.031630546, 0.04436864, -0.022899942, -0.003327648, -0.006691077, 0.013310592, -0.035924286, -0.008158104, -0.005116706, -0.040647399, 0.002397338, 0.014455589, -0.030342424, 0.028624929, -0.031773672, 0.043509893, -0.001833785, -0.025619311, 0.032775544, -0.046944883, 0.013739966, -0.030485548, 0.018319955, 0.016745584, -0.020323699, -0.015815273, -0.020896198, -0.015171212, 0.026334934, 0.035638034, 0.008873728, 0.003291867, -0.02647806, 0.003649678, 0.003613897, 0.009804038, -0.013525278, 0.005367174, 0.007657168, -0.017103394, -0.015815273, -0.000398065, 0.013310592, 0.014240902, 0.003935928, 0.001735386, -0.018606203, 0.008265448, -0.068127327, 0.012165595, -0.007836075, 0.02189807, -0.000983982, 0.019178702, -0.009589351, -0.013739966, -0.007800293, 0.040361151, 0.027623056, -0.002540462, -0.03663991, 0.011163722, -0.016316209, -0.006333265, -0.010877473, -0.023329318, -0.021468697, 0.013596841, 0.032059919, 0.007442481, 0.02433119, -0.003613897, -0.013596841, 0.010448099, 0.010877473, -0.0098756, 0.033920541, -0.006691077, -0.039502401, -0.010877473, -0.016960271, 0.014097777, -0.008122323, 0.007478263, 0.010018725, -0.030485548, -0.011020597, 0.000317558, 0.00461577, 0.020466823, 0.070703574, -0.024617439, 0.002111088, -0.024617439, -0.004204286, -0.048662379, -0.006834202, 0.027766181, -0.002504681, 0.025189938, 0.033920541, -0.02833868, -0.000773768, -0.03578116, 0.015958399, 0.006369046, 0.033204917, -0.006762639, 0.02003745, -0.020180576, 0.015886836, -0.015385899, -0.029340552, -0.009446226, 0.015529023, -0.010376536, -0.012881218, -0.000715623, 0.014312465, -0.029197427, -0.000684315, 0.000360048, 0.015815273, -0.027050557, 0.006655296, 0.018892452, -0.021182448, 0.031201173, 0.014240902, -0.022756819, 0.004365302, -0.020609949, 0.008515916, -0.016244646, 0.001162888, 0.000084421, 0.003273976, -0.017819017, 0.000576971, 0.020753073, -0.004794675, 0.018105267, -0.013095905, -0.028052431, 0.004114834, 0.02833868, -0.027193682, -0.010877473, -0.002576244, 0.011879345, -0.017819017, 0.006726858, -0.021754947, -0.031773672, -0.013382155, 0.024903689, 0.013167467, 0.000033964, 0.034063663, 0.022613693, -0.038357403, -0.010018725, -0.017174957, -0.004418973, 0.02189807, -0.003166633, -0.009589351, 0.009303101, -0.036496785, -0.005760767, -0.006583733, -0.003596007, 0.014026215, -0.003828584, -0.02833868, -0.020896198, 0.001449137, 0.039502401, 0.012881218, 0.025476186, 0.000961619, -0.025762435, 0.002808821, 0.034922414, 0.004687332, -0.046658635, 0.030914923, -0.036067411, 0.008659041, -0.004025381, -0.0301993, -0.026048684, 0.024760563, 0.036496785, -0.029913051, 0.015672149, 0.007764512, 0.01509965, 0.010304974, -0.004490536, -0.007585606, -0.019464951, 0.016602458, -0.007048889, -0.005510299, 0.011163722, 0.013739966, -0.034636162, 0.020609949, -0.004418973, 0.034636162, 0.040933646, 0.031773672, 0.023758691, 0.031344298, -0.006798421, 0.026048684, -0.011521534, 0.020753073, 0.014384027, 0.026334934, -0.034206789, -0.036067411, 0.014598713, 0.023758691, -0.039216153, 0.003363429, 0.002880384, -0.006726858, -0.000916892, -0.001395465, -0.009660914, 0.032059919, 0.008086543, 0.029054303, -0.011593096, 0.065551087, 0.031058047, -0.041219898, -0.014097777, -0.017103394, 0.016244646, -0.028911177, 0.044654887, -0.030771798, 0.024760563, 0.02833868, 0.018248392, 0.026907433, -0.002227377, 0.034063663, 0.000167724, 0.021039322, -0.018892452, 0.012738093, -0.001395465, 0.005760767, -0.024760563, -0.002683587, 0.000230341, -0.0197512, 0.009088415, -0.00400749, -0.026764309, -0.012881218, 0.016101522, -0.009303101, 0.015529023, -0.016817145, 0.014312465, -0.030914923, -0.018463079, 0.020323699, -0.023472441, -0.023758691, -0.005009362, 0.018176829, 0.012738093, 0.009374664, -0.031916797, 0.016387772, 0.027479932, 0.015529023, -0.021325571, 0.020323699, -0.025476186, 0.008515916, -0.039788652, -0.007979199, -0.009947163, -0.006869983, 0.004758894, 0.022613693, -0.013668403, -0.015171212, 0.035351787, -0.022327444, 0.019178702, 0.000404774, -0.003524444, -0.012094032, 0.023901815, -0.0400749, -0.004579989, 0.00245101, 0.013024342, 0.015958399, 0.009517789, 0.034779288, 0.021468697, 0.00062617, 0.007728731, -0.028195554, 0.0301993, -0.002504681, 0.008909509, 0.004651551, -0.007013108, 0.03148742, 0.019608077, 0.002540462, 0.043509893, -0.006190141, 0.024903689, 0.010519661, 0.018319955, 0.010519661, 0.009660914, 0.000966091, -0.004454754, 0.000299667, 0.007907636, -0.018463079, 0.004758894, -0.001851675, -0.002415228, 0.010233412, -0.024617439, -0.030771798, 0.018749328, 0.003023508, 0.005474518, -0.011521534, -0.008551697, 0.007979199, 0.03363429, 0.000275068, 0.007800293, 0.0039896, 0.00522405, -0.035924286, -0.01416934, 0.02619181, -0.025476186, -0.033777416, 0.021325571, -0.02218432, 0.001833785, 0.027766181, -0.006118578, 0.032059919, 0.038929902, 0.003613897, 0.031344298, -0.002737259, 0.057536107, 0.009732476, 0.020753073, 0.005402955, -0.047803629, -0.040933646, 0.009052633, -0.030485548, 0.018319955, 0.025046812, -0.002361557, 0.045513637, 0.008766385, -0.031058047, 0.014312465, 0.002737259, -0.004186396, 0.032059919, 0.024617439, -0.012666531, 0.006798421, 0.02619181, -0.012523406, 0.009947163, 0.005617642, 0.039216153, 0.008766385, 0.009517789, 0.042651143, -0.012881218, 0.007263576, -0.000514354, 0.016817145, -0.048948627, 0.018176829, 0.034922414, 0.005331393, 0.000391356, -0.017604331, 0.026048684, -0.011807784, 0.017461207, 0.012809656, 0.029483676, -0.017174957, 0.023472441, 0.005188268, 0.007585606, -0.034922414, 0.069558576, 0.023472441, -0.010304974, 0.020180576, 0.025046812, 0.016459335, 0.000317558, -0.018606203, 0.066696085, 0.011664659, 0.025762435, -0.016888708, 0.015314337, -0.009231539, 0.016459335, -0.021325571, 0.009303101, 0.000840857, -0.014455589, 0.00170855, 0.014741838, -0.004168505, -0.009088415, -0.0074067, -0.004472645, 0.002665696, 0.023615567, 0.038929902, -0.016960271, -0.027193682, 0.03663991, -0.016530896, 0.003256086, 0.015171212, 0.036926158, 0.02433119, 0.047231134, -0.049234878, 0.009947163, -0.01109216, -0.014097777, -0.007585606, 0.00338132, -0.008086543, 0.018176829, -0.014527151, -0.000205742, -0.041219898, 0.012666531, 0.046086136, 0.004025381, -0.0074067, 0.033348043, -0.020896198, -0.000514354, 0.033491168, 0.004257958, 0.02404494, -0.008372792, -0.021754947, 0.037784904, 0.013453716, 0.013024342, -0.026334934, 0.023758691, 0.012094032, 0.006297485, 0.045227386, 0.021039322, -0.020323699, 0.005975454, 0.008802165, 0.00370335, 0.006941545, -0.029340552, -0.008551697, -0.004454754, 0.003488663, 0.010662786, 0.00801498, 0.010090288, 0.015600586, 0.018105267, -0.020180576, -0.00307718, 0.031630546, 0.000644061, 0.011950907, -0.023472441, 0.01509965, -0.035924286, 0.016459335, -0.027766181, -0.014598713, -0.021611821, -0.013310592, -0.021039322, -0.02189807, 0.018606203, -0.007979199, 0.018176829, 0.022041194, -0.002916165, 0.009088415, -0.00522405, -0.018176829, -0.031916797, -0.017318081, -0.025476186, -0.014527151, -0.017675893, -0.026621183, 0.000362284, 0.02619181, 0.016101522, -0.013310592, 0.021325571, 0.027909305, 0.016316209, 0.006011235, 0.008551697, 0.030914923, -0.070703574, 0.004794675, -0.019321827, -0.011163722, -0.014598713, -0.0197512, -0.005438737, -0.025189938, -0.037212405, 0.004168505, -0.021754947, 0.018033706, 0.035065539, 0.022756819, 0.005581861, -0.007764512, -0.003005618, -0.003524444, 0.006655296, -0.00170855, -0.046086136, -0.009374664, 0.001744332, 0.030056175, 0.016674021, 0.014312465, 0.029054303, -0.009052633, 0.005832329, -0.029197427, -0.004723113, 0.032489292, 0.022899942, -0.044941138, 0.014026215, -0.007227794, -0.035494912, 0.001261286, 0.079004802, 0.008122323, 0.022041194, 0.016602458, 0.046658635, -0.016888708, -0.006547953, -0.016316209, 0.002021636, -0.016745584, 0.003792803, 0.005116706, -0.037784904, -0.028481804, -0.014670276, -0.005259831, 0.018892452, 0.001252341, -0.068699829, -0.021611821, -0.015242774, -0.027050557, -0.032059919, 0.026048684, -0.014240902, -0.007013108, 0.014598713, -0.005474518, -0.007192013, -0.016817145, 0.00400749, 0.010519661, 0.007657168, 0.005295612, 0.009124196, 0.024474313, -0.019894326, -0.044941138, -0.022756819, -0.022327444, -0.041792396, 0.027479932, -0.013668403, -0.036210533, 0.001225505, 0.009947163, -0.044654887, -0.02003745, 0.031344298, -0.004186396, -0.009517789, 0.000720096, -0.023901815, 0.000670897, 0.022899942, 0.006619515, 0.006512171, 0.022327444, 0.021468697, 0.021611821, 0.039216153, -0.019608077, 0.028052431, -0.020466823, -0.0197512, 0.004454754, 0.026048684, -0.024617439, -0.000333212, 0.002200541, -0.002629915, 0.021611821, 0.009374664, 0.00894529, -0.057822354, -0.009660914, -0.002844602, 0.020323699, 0.000603807, 0.018033706, -0.027050557, -0.004186396, -0.019608077, -0.021754947, 0.009732476, 0.01602996, -0.016960271, -0.001520699, -0.023615567, 0.004383192, 0.000925838, 0.023043068, 0.032775544, 0.006404828, -0.010304974, 0.019321827, 0.017604331, -0.01230872, 0.007657168, 0.005402955, -0.03148742, -0.000550135, -0.002111088, -0.029626802, 0.01323903, -0.033777416, 0.006655296, 0.035065539, -0.003256086, 0.000907947, 0.004025381, 0.011020597, -0.04808988, 0.02619181, 0.015171212, 0.023758691, 0.014741838, -0.001359684, -0.041506145, -0.009088415, -0.012738093, 0.000176669, 0.033777416, 0.024188064, -0.002307885, 0.023901815, 0.00034663, -0.024474313, -0.031773672, -0.023758691, -0.024474313, -0.011163722, 0.000447265, 0.005080925, -0.00123445, 0.006297485, -0.031058047, -0.012738093, -0.003059289, -0.026907433, -0.015672149, -0.005760767, 0.023043068, 0.023043068, -0.015028087, 0.017747456, 0.013883091, -0.011807784, 0.038357403, -0.016817145, 0.014884963, 0.017389644, -0.000599334, 0.016602458, 0.008086543, -0.039502401, 0.050379876, -0.024474313, 0.035351787, -0.023758691, 0.002039526, 0.004061162, -0.012165595, -0.020180576, 0.001636988, -0.013883091, 0.017389644, 0.006225922, -0.03578116, -0.016817145, -0.001332848, -0.005617642, -0.008730603, -0.039216153, 0.02433119, 0.028052431, 0.02833868, 0.039502401, 0.010233412, -0.006869983, 0.021468697, 0.002039526, -0.0197512, 0.020753073, 0.027050557, 0.009517789, 0.011449971, 0.038929902, 0.008873728, 0.009374664, 0.007871855, -0.006082797, -0.007156232, -0.014670276, -0.000447265, 0.046944883, -0.015242774, -0.019894326, 0.008158104, 0.016173085, -0.018463079, 0.034922414, -0.005009362, -0.000092248, 0.005760767, 0.006190141, -0.022613693, 0.034206789, 0.012523406, 0.000992927, 0.038071156, -0.048376128, -0.017747456, 0.014384027, 0.000751404, 0.015314337, -0.010519661, 0.058681104, 0.013954652, 0.022899942, -0.003757022, 0.01416934, -0.000469628, -0.008337011, -0.001153942, 0.02189807, -0.024760563, 0.01416934, -0.012738093, -0.025046812, 0.030771798, -0.046658635, -0.002137924, 0.053242367, 0.010090288, -0.046086136, 0.016316209, -0.005295612, 0.023043068, -0.023043068, 0.010233412, -0.018319955, -0.017389644, 0.030485548, 0.009660914, 0.017174957, 0.050379876, -0.010304974, 0.017819017, -0.000364521, 0.011163722, 0.001753277, 0.010448099, 0.013095905, 0.008372792, -0.01109216, 0.036926158, -0.015672149, -0.014598713, 0.008981071, -0.011879345, -0.036926158, -0.01789058, -0.008694822, -0.028911177, -0.017103394, -0.028768053, -0.030914923, 0.001033181, 0.00431163, -0.024474313, -0.031058047, 0.010018725, 0.00647639, -0.027336806, 0.025046812, 0.003148742, -0.010018725, 0.03663991, 0.033348043, -0.001162888, -0.01016185, 0.010376536, 0.010519661, 0.019178702, 0.016101522, 0.007943418, -0.013739966, -0.013525278, -0.027193682, 0.006655296, 0.027050557, -0.017389644, -0.027479932, 0.041792396, 0.045513637, -0.014741838, 0.012451844, 0.018319955, -0.00153859, 0.010519661, 0.017962143, -0.012594969, 0.018606203, 0.023472441, -0.034063663, -0.004061162, 0.015600586, 0.019178702, 0.002361557, -0.025619311, -0.00586811, -0.02003745, 0.013739966, 0.017675893, -0.025189938, -0.002415228, 0.001547535, 0.019608077, 0.039502401, -0.00184273, 0.025189938, 0.00277304, 0.020323699, 0.007227794, 0.012165595, -0.00370335, 0.02433119, -0.00586811, 0.016459335, 0.034206789, 0.001051072, -0.010519661, -0.004096943, 0.00153859, 0.01574371, 0.01230872, -0.007692949, -0.019464951, 0.005116706, 0.017389644, 0.024903689, 0.046658635, -0.010519661, 0.020609949, 0.060684849, -0.045227386, -0.008551697, -0.004293739, -0.001502809, -0.015815273, -0.005975454, 0.000290722, 0.027050557, -0.002245268, -0.016888708, -0.027193682, -0.001288122, -0.021182448, -0.041219898, 0.031916797, 0.030628674, -0.03234617, 0.006655296, 0.008372792, -0.009016853, -0.033348043, 0.010877473, -0.05238362, -0.004490536, -0.028911177, 0.006905764, -0.003506554, 0.039788652, -0.036496785, -0.015886836, 0.015314337, -0.015672149, 0.006225922, -0.021182448, -0.034349915, -0.043223642, -0.025476186, 0.002558353, 0.007048889, -0.037784904, -0.014026215, -0.044654887, -0.036926158, 0.008229667, 0.007728731, 0.039216153, -0.00027954, 0.026907433, 0.027193682, -0.017174957, -0.011378409, 0.017174957, -0.015815273, 0.009446226, 0.033777416, -0.014384027, 0.003721241, -0.024760563, -0.000229223, 0.008802165, -0.000377939, -0.007692949, 0.016173085, 0.018248392, -0.02218432, -0.003202414, -0.033204917, -0.002969836, -0.023186192, 0.030056175, -0.015457462, -0.015314337, -0.008981071, 0.022613693, -0.014026215, -0.025476186, 0.025333062, 0.034206789, 0.010662786, 0.016387772, 0.030342424, -0.008086543, 0.007120451, 0.000221396, 0.025619311, 0.01789058, -0.008086543, 0.011807784, -0.016101522, 0.002719368, 0.005653423, 0.017962143, -0.001941128, 0.06297484, 0.016244646, 0.003524444, 0.018749328, -0.001815894, 0.006082797, 0.069558576, -0.011020597, 0.018033706, 0.026621183, 0.007692949, -0.008694822, 0.035924286, -0.001878511, -0.005975454, -0.028911177, -0.007871855, 0.014741838, 0.008587479, 0.026621183, 0.005259831, -0.023186192, 0.000368993, -0.01323903, 0.002683587, -0.011306847, 0.007478263, -0.000621698, 0.022756819, -0.018892452, -0.013167467, 0.007764512, -0.010877473, -0.017461207, -0.013525278, 0.014240902, -0.019464951, -0.009016853, 0.016173085, -0.027479932, 0.002934055, 0.042937394, -0.004830457, -0.031201173, -0.024188064, 0.00245101, 0.017318081, 0.001824839, -0.022756819, 0.021325571, -0.027479932, -0.008659041, 0.008337011, -0.016674021, -0.003452882, 0.000711151, -0.045799885, 0.013739966, -0.029340552, -0.035208661, 0.000554608, -0.007800293, 0.018892452, 0.028481804, -0.011593096, -0.00894529, 0.024474313, -0.008050761, 0.025476186, -0.001306012, -0.00214687, -0.008050761, -0.018606203, -0.006047016, -0.028768053, 0.029197427, -0.021468697, 0.005402955, -0.021039322, -0.014312465, -0.002325775, -0.020896198, 0.000706678, 0.035638034, -0.008480135, -0.035351787, 0.014312465, 0.012523406, 0.011807784, 0.003041399, -0.010018725, -0.022613693, -0.021182448, -0.005474518, -0.007120451, 0.025476186, 0.036926158, -0.007907636, -0.014097777, 0.010519661, 0.005617642, 0.014670276, -0.011664659, 0.011879345, -0.012738093, -0.007871855, -0.012666531, 0.032918669, -0.010018725, 0.007943418, 0.024188064, 0.005760767, -0.003918037, 0.022613693, 0.017318081, 0.036496785, 0.037784904, 0.008694822, 0.016674021, 0.000106225, 0.003685459, -0.031201173, -0.01016185, -0.02404494, -0.019035578, 0.031773672, 0.000975037, -0.032489292, -0.033920541, 0.015385899, -0.023186192, 0.012523406, -0.011163722, -0.005116706, 0.015314337, -0.006834202, -0.038357403, -0.023472441, 0.015529023, 0.017747456, 0.005653423, -0.002325775, 0.009088415, -0.022899942, 0.02433119, 0.000849803, -0.042078644, -0.004257958, 0.018176829, -0.0049378, -0.002415228, -0.016173085, 0.012594969, 0.013596841, -0.017031832, -0.001806949, -0.003810694, 0.003005618, 0.046944883, -0.025476186, 0.012738093, 0.009016853, -0.009660914, 0.012666531, 0.014026215, -0.010519661, 0.022327444, 0.00400749, -0.007478263, -0.03578116, 0.009804038, -0.028911177, -0.018248392, 0.004758894, 0.005939673, 0.033920541, -0.011378409, -0.005474518, 0.012451844, 0.018176829, 0.033920541, 0.025905561, -0.014670276, 0.001798003, 0.031344298, 0.00431163, 0.027193682, -0.006798421, 0.011449971, 0.00894529, 0.013883091, 0.023758691, -0.007692949, 0.031344298, -0.014384027, -0.007514044, -0.026621183, -0.001645933, -0.010090288, -0.009589351, 0.008193886, -0.007871855, -0.031773672, 0.013525278, 0.006583733, 0.010949035, -0.004794675, -0.004061162, -0.021468697, 0.011020597, -0.020609949, 0.010018725, 0.010662786, 0.008158104, 0.00370335, 0.007800293, -0.029626802, 0.029197427, -0.017174957, -0.00586811, -0.003112961, -0.018749328, -0.042364895, 0.027050557, 0.028624929, 0.008837947, 0.026334934, 0.018248392, -0.004758894, 0.009446226, -0.033061791, -0.022041194, -0.021039322, 0.008086543, -0.009088415, -0.031630546, 0.020896198, -0.018749328, 0.022613693, -0.014097777, 0.004347411, 0.014813401, -0.013525278, -0.001726441, 0.010448099, 0.036067411, -0.026048684, -0.020753073, -0.005045144, 0.033348043, -0.002576244, 0.02404494, 0.022041194, 0.017031832, -0.000297431, -0.003184523, -0.012738093, 0.022756819, -0.016888708, 0.021039322, -0.000313085, 0.032203045, -0.011235285, 0.001583316, -0.00461577, -0.026334934, -0.002934055, -0.005939673, 0.001458082, 0.007156232, -0.005689205, -0.042937394, 0.011378409, 0.007156232, 0.00554608, 0.026621183, -0.014455589, -0.017604331, -0.02647806, -0.03578116, -0.009804038, 0.006905764, -0.0197512, -0.035494912, -0.027623056, -0.00461577, 0.011521534, 0.006905764, 0.009517789, 0.003112961, 0.033920541, -0.004687332, -0.005045144, -0.009231539, 0.000126911, 0.008694822, -0.029340552, 0.011163722, 0.047517382, -0.039788652, -0.033348043, -0.003041399, -0.007657168, -0.035065539, -0.012165595, -0.024617439, 0.0049378, 0.017461207, 0.029626802, -0.004723113, -0.000366757, -0.041792396, 0.041219898, -0.009446226, 0.016960271, -0.017747456, -0.036067411, 0.025046812, 0.027336806, 0.025905561, 0.049234878, 0.016602458, -0.005796548, 0.021325571, -0.003524444, -0.000872166, 0.014670276, 0.020323699, 0.002737259, 0.009660914, -0.006440609, -0.062402345, -0.062688597, -0.008158104, -0.018749328, 0.005438737, -0.002066362, 0.000205742, -0.018749328, 0.017103394, -0.03578116, 0.000265004, -0.03663991, -0.024760563, 0.054101113, -0.00647639, -0.026334934, 0.034779288, 0.022756819, -0.033348043, -0.02433119, -0.041792396, -0.014455589, -0.023329318, -0.004687332, -0.013453716, -0.018319955, -0.014455589, 0.043509893, 0.013453716, -0.014813401, 0.009052633, -0.034349915, 0.052097369, -0.003774913, 0.016316209, -0.027050557, 0.028195554, -0.007549825, -0.020466823, 0.014598713, -0.005939673, 0.003273976, -0.052097369, 0.002701478, -0.02404494, -0.005903892, 0.009947163, -0.00043161, 0.02189807, 0.042078644, -0.020609949, 0.007836075, 0.018892452, 0.001207614, 0.009159978, -0.029197427, -0.023329318, 0.004347411, -0.019464951, 0.020180576, 0.019894326, 0.00615436, 0.021468697, -0.017461207, -0.011879345, -0.002307885, 0.016101522, -0.029626802, -0.014455589, 0.020323699, 0.020753073, 0.018176829, -0.006082797, 0.027766181, 0.016530896, -0.008444354, 0.001806949, 0.029626802, -0.012451844, 0.023186192, 0.006869983, -0.034063663, -0.012094032, -0.021611821, -0.008050761, 0.05581861, -0.004257958, -0.025333062, -0.004526317, 0.018033706, 0.027479932, 0.025476186, 0.008802165, -0.009589351, 0.012809656, 0.012523406, 0.0400749, 0.018033706, 0.011020597, 0.014956526, 0.013883091, -0.006655296, 0.019608077, -0.03234617, 0.007585606, -0.036067411, -0.024617439, -0.001628043, 0.022041194, 0.026764309, -0.038643654, -0.009124196, -0.020323699, -0.013883091, 0.02404494, 0.002361557, -0.03234617, -0.0049378, 0.018606203, 0.022327444, 0.043509893, -0.030485548, -0.003560225, 0.007442481, 0.00370335, 0.011449971, 0.023472441, 0.000197915, -0.011950907, 0.023329318, -0.009804038, -0.025619311, 0.0074067, -0.003953818, 0.014312465, 0.048662379, -0.027193682, 0.019894326, -0.042364895, 0.003327648, 0.042937394, -0.040933646, -0.020466823, 0.056104861, 0.020896198, -0.014527151, -0.036210533, -0.022470569, 0.035924286, -0.013167467, -0.055532362, -0.006190141, -0.027909305, 0.012881218, 0.003005618, 0.005689205, 0.01109216, -0.016387772, -0.021468697, 0.018176829, -0.021611821, 0.032918669, 0.002951946, -0.008837947, -0.031773672, -0.029913051, 0.017318081, 0.017461207, -0.02833868, -0.027479932, -0.023615567, 0.037212405, -0.023615567, -0.02404494, 0.029626802, 0.002951946, 0.004043271, -0.001377575, 0.007800293, 0.024188064, -0.027336806, -0.002361557, -0.00307718, -0.025189938, 0.007192013, -0.000207978, 0.040933646, 0.010877473, -0.000720096, -0.006941545, 0.003059289, 0.032775544, -0.007657168, 0.019321827, -0.012094032, 0.042078644, -0.010591224, 0.011807784, -0.016173085, -0.015529023, -0.023615567, 0.016173085, -0.018606203, 0.007192013, -0.008587479, 0.000257177, 0.002245268, -0.011879345, 0.044082388, -0.005939673, -0.003059289, -0.013954652, -0.026621183, 0.039502401, -0.006440609, 0.014384027, 0.012094032, -0.034779288, -0.002379447, 0.023329318, 0.029483676, -0.002325775, -0.001565426, 0.025619311, 0.018606203, -0.016101522, -0.0301993, 0.002576244, 0.035208661, 0.002325775, -0.011664659, -0.022470569, -0.047231134, -0.016888708, -0.017747456, 0.05152487, 0.009374664, -0.010591224, 0.009303101, -0.005009362, -0.029197427, 0.001726441, -0.023758691, -0.002934055, -0.017461207, 0.018606203, -0.002665696, -0.003578116, -0.018606203, -0.004651551, -0.021325571, 0.005367174, -0.009124196, 0.016888708, -0.01295278, 0.002048471, -0.011593096, 0.017604331, -0.008515916, 0.006082797, -0.036067411, -0.027336806, -0.010018725, -0.001306012, 0.026334934, -0.019321827, -0.030914923, -0.026764309, -0.0024689, -0.005581861, -0.002755149, 0.019464951, -0.01295278, 0.011163722, 0.000639588, 0.025476186, 0.029483676, 0.042651143, -0.011306847, 0.002737259, 0.010090288, -0.015600586, 0.038357403, 0.029197427, -0.008193886, 0.044082388, 0.032489292, -0.00123445, -0.008372792, 0.009124196, -0.00309507, -0.041792396, 0.007764512, -0.009947163, 0.044941138, 0.030056175, -0.013024342, -0.019321827, 0.019321827, 0.008551697, -0.053814866, 0.038071156, -0.037784904, 0.012165595, -0.008444354, -0.029626802, -0.006905764, -0.028195554, -0.01080591, -0.0098756, -0.032203045, 0.040361151, -0.033920541, 0.004454754, -0.036067411, 0.011879345, -0.011235285, 0.020609949, -0.004579989, 0.0074067, -0.017103394, 0.01789058, 0.011449971, -0.007836075, 0.000427138, -0.007120451, 0.008337011, 0.00123445, -0.003273976, -0.007263576, -0.011449971, 0.022756819, 0.002576244, -0.013310592, -0.013382155, -0.011664659, -0.013453716, -0.005152487, -0.050379876, -0.034636162, -0.011306847, 0.015028087, 0.008480135, -0.047517382, -0.00586811, -0.008301229, -0.01416934, 0.000876638, 0.000326503, 0.01080591, 0.004150615, 0.005259831, -0.008837947, 0.017031832, -0.016316209, -0.036210533, -0.013883091, -0.000295195, 0.014240902, 0.020753073, -0.022899942, -0.038929902, 0.00586811, -0.008050761, 0.00016437, -0.001932183, 0.001789058, 0.017031832, 0.045227386, -0.016745584, -0.005689205, 0.008372792, 0.008301229, -0.016674021, -0.004222177, 0.005832329, 0.016173085, -0.009374664, -0.006869983, -0.052669868, 0.035065539, 0.000123557, 0.007478263, 0.033491168, 0.054387365, 0.002254213, -0.007836075, -0.020323699, -0.019178702, -0.010376536, -0.039788652, -0.032632418, -0.012380281, -0.002540462, -0.016602458, -0.022756819, 0.019608077, 0.001887456, 0.032918669, 0.008050761, -0.013739966, 0.006547953, -0.016674021, 0.001574371, 0.019321827, -0.016960271, -0.031201173, 0.027766181, 0.006655296, 0.020753073, 0.009804038, 0.024903689, -0.043509893, 0.015815273, -0.017962143, -0.043223642, 0.033920541, -0.007764512, -0.006762639, 0.017819017, -0.026621183, 0.046658635, -0.004490536, 0.024188064, -0.010304974, 0.004651551, 0.047231134, -0.038071156, 0.009589351, -0.033920541, -0.027050557, 0.050093625, 0.008515916, -0.025189938, -0.008050761, 0.011950907, 0.004973582, 0.014527151, -0.009374664, -0.003721241, 0.019608077, 0.049807377, 0.016602458, 0.02404494,
32 }
33
34 genresFilterCondition := bson.D{{"genres", bson.D{{"$ne", "Crime"}}}}
35
36 yearAndGenresFilterCondition := bson.D{
37 {"$and", bson.A{
38 bson.D{{"year", bson.D{{"$lte", 2015}}}},
39 bson.D{{"genres", bson.D{{"$eq", "Action"}}}},
40 }},
41 }
42
43 filter := bson.D{{"$or", bson.A{
44 genresFilterCondition, yearAndGenresFilterCondition,
45 }},
46 }
47
48 vectorSearchStage := bson.D{
49 {"$vectorSearch", bson.D{
50 {"index", "vector_index"},
51 {"path", "plot_embedding_voyage_3_large"},
52 {"filter", filter},
53 {"queryVector", queryVector},
54 {"numCandidates", 200},
55 {"limit", 10},
56 }},
57 }
58
59 projectStage := bson.D{
60 {"$project", bson.D{
61 {"_id", 0},
62 {"plot", 1},
63 {"title", 1},
64 {"genres", 1},
65 {"year", 1},
66 {"score", bson.D{{"$meta", "vectorSearchScore"}}},
67 }}}
68
69 cursor, err := coll.Aggregate(ctx, mongo.Pipeline{vectorSearchStage, projectStage})
70 if err != nil {
71 log.Fatalf("failed to retrieve data from the server: %v", err)
72 }
73 // display the results
74 type ProjectedMovieResult struct {
75 Title string `bson:"title"`
76 Plot string `bson:"plot"`
77 Genres []string `bson:"genres"`
78 Year int32 `bson:"year"`
79 Score float64 `bson:"score"`
80 }
81
82 var results []ProjectedMovieResult
83 if err = cursor.All(ctx, &results); err != nil {
84 log.Fatalf("failed to unmarshal results to ProjectedMovieResult objects: %v", err)
85 }
86 for _, result := range results {
87 fmt.Printf("Title: %v \nPlot: %v \nGenres: %v \nYear: %v \nScore: %v \n\n", result.Title, result.Plot, result.Genres, result.Year, result.Score)
88 }
89}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
go run AtlasVectorSearchTutorial.go
1Title: 3 Ninjas: High Noon at Mega Mountain
2Plot: Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...
3Genres: [Action Adventure Comedy]
4Year: 1998
5Score: 0.7746343612670898
6
7Title: White Wolves: A Cry in the Wild II
8Plot: A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...
9Genres: [Action Adventure Family]
10Year: 1993
11Score: 0.770106315612793
12
13Title: Space Raiders
14Plot: A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.
15Genres: [Action Adventure Sci-Fi]
16Year: 1983
17Score: 0.7569591999053955
18
19Title: The Ewok Adventure
20Plot: Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.
21Genres: [Adventure Family Fantasy]
22Year: 1984
23Score: 0.7515435218811035
24
25Title: Time Bandits
26Plot: A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.
27Genres: [Adventure Comedy Fantasy]
28Year: 1981
29Score: 0.7513599395751953
30
31Title: Chitty Chitty Bang Bang
32Plot: A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.
33Genres: [Adventure Family Fantasy]
34Year: 1968
35Score: 0.7492260932922363
36
37Title: Forest Warrior
38Plot: A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.
39Genres: [Action Adventure Comedy]
40Year: 1996
41Score: 0.7473714351654053
42
43Title: Forest Warrior
44Plot: A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.
45Genres: [Action Adventure Comedy]
46Year: 1996
47Score: 0.7473714351654053
48
49Title: Warriors of Virtue
50Plot: A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.
51Genres: [Action Fantasy Adventure]
52Year: 1997
53Score: 0.7464213371276855
54
55Title: Taxandria
56Plot: A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...
57Genres: [Animation Adventure Fantasy]
58Year: 1994
59Score: 0.7453246116638184
go run AtlasVectorSearchTutorial.go
1Title: Star Wars: Episode IV - A New Hope
2Plot: Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.
3Genres: [Action Adventure Fantasy]
4Year: 1977
5Score: 0.79868483543396
6
7Title: Dune
8Plot: A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.
9Genres: [Action Adventure Sci-Fi]
10Year: 1984
11Score: 0.7949700355529785
12
13Title: Message from Space
14Plot: In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...
15Genres: [Action Adventure Sci-Fi]
16Year: 1978
17Score: 0.7913978099822998
18
19Title: Message from Space
20Plot: In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...
21Genres: [Action Adventure Sci-Fi]
22Year: 1978
23Score: 0.7913978099822998
24
25Title: Star Wars: Episode V - The Empire Strikes Back
26Plot: After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.
27Genres: [Action Adventure Fantasy]
28Year: 1980
29Score: 0.7809884548187256
30
31Title: Star Wars: Episode VI - Return of the Jedi
32Plot: After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.
33Genres: [Action Adventure Fantasy]
34Year: 1983
35Score: 0.7784996032714844
36
37Title: Star Wars: Episode I - The Phantom Menace
38Plot: Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.
39Genres: [Action Adventure Fantasy]
40Year: 1999
41Score: 0.7766742706298828
42
43Title: Ewoks: The Battle for Endor
44Plot: The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...
45Genres: [Adventure Family Fantasy]
46Year: 1985
47Score: 0.7676119804382324
48
49Title: Krull
50Plot: A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.
51Genres: [Action Adventure Fantasy]
52Year: 1983
53Score: 0.7624373435974121
54
55Title: Starcrash
56Plot: An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.
57Genres: [Action Adventure Fantasy]
58Year: 1978
59Score: 0.7582714557647705
1
2

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1import static com.mongodb.client.model.Aggregates.*;
2import static com.mongodb.client.model.Projections.*;
3import static com.mongodb.client.model.search.SearchPath.fieldPath;
4import static java.util.Arrays.asList;
5
6import com.mongodb.client.MongoClient;
7import com.mongodb.client.MongoClients;
8import com.mongodb.client.MongoCollection;
9import com.mongodb.client.MongoDatabase;
10import com.mongodb.client.model.*;
11import com.mongodb.client.model.search.VectorSearchOptions;
12import java.util.Arrays;
13import java.util.List;
14import com.mongodb.client.model.search.FieldSearchPath;
15import org.bson.Document;
16import org.bson.conversions.Bson;
17
18public class AtlasVectorSearchTutorial {
19 public static void main( String[] args ) {
20 // specify connection
21 String uri = "<connection-string>";
22
23 // establish connection and set namespace
24 try (MongoClient mongoClient = MongoClients.create(uri)) {
25 MongoDatabase database = mongoClient.getDatabase("sample_mflix");
26 MongoCollection<Document> collection = database.getCollection("embedded_movies");
27
28 // define $vectorSearch query options
29 List<Double> queryVector = (asList(-0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558));
30 String indexName = "vector_index";
31 FieldSearchPath fieldSearchPath = fieldPath("plot_embedding_voyage_3_large");
32 int numCandidates = 200;
33 int limit = 10;
34 List<String> genresNotInCriteria = Arrays.asList("Drama", "Western", "Crime");
35 List<String> genresInCriteria = Arrays.asList("Action", "Adventure", "Family");
36 Bson criteria = Filters.and(
37 Filters.nin("genres", genresNotInCriteria),
38 Filters.in("genres", genresInCriteria),
39 Filters.gte("year", 1960),
40 Filters.lte("year", 2000));
41 VectorSearchOptions options = VectorSearchOptions
42 .approximateVectorSearchOptions(numCandidates)
43 .filter(criteria);
44
45 // define pipeline
46 List<Bson> pipeline = asList(
47 vectorSearch(
48 fieldSearchPath,
49 queryVector,
50 indexName,
51 limit,
52 options),
53 project(
54 fields(exclude("_id"), include("title"), include("plot"), include("year"),
55 include("genres"), metaVectorSearchScore("score"))));
56
57 // run query and print results
58 collection.aggregate(pipeline)
59 .forEach(doc -> System.out.println(doc.toJson()));
60 }
61 }
62}

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1import static com.mongodb.client.model.Aggregates.*;
2import static com.mongodb.client.model.Projections.*;
3import static com.mongodb.client.model.search.SearchPath.fieldPath;
4import static java.util.Arrays.asList;
5
6import com.mongodb.client.MongoClient;
7import com.mongodb.client.MongoClients;
8import com.mongodb.client.MongoCollection;
9import com.mongodb.client.MongoDatabase;
10import com.mongodb.client.model.*;
11import com.mongodb.client.model.search.VectorSearchOptions;
12import java.util.List;
13import com.mongodb.client.model.search.FieldSearchPath;
14import org.bson.Document;
15import org.bson.conversions.Bson;
16
17public class AtlasVectorSearchTutorial {
18 public static void main( String[] args ) {
19 // specify connection
20 String uri = "<connection-string>";
21
22 // establish connection and set namespace
23 try (MongoClient mongoClient = MongoClients.create(uri)) {
24 MongoDatabase database = mongoClient.getDatabase("sample_mflix");
25 MongoCollection<Document> collection = database.getCollection("embedded_movies");
26
27 // define $vectorSearch query options
28 List<Double> queryVector = (asList(-0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494));
29 String indexName = "vector_index";
30 FieldSearchPath fieldSearchPath = fieldPath("plot_embedding_voyage_3_large");
31 int numCandidates = 200;
32 int limit = 10;
33 Bson criteria = Filters.or(
34 Filters.lte("year", 2015),
35 Filters.and(
36 Filters.lte("year", 2015),
37 Filters.eq("genres", "Action")));
38 VectorSearchOptions options = VectorSearchOptions
39 .approximateVectorSearchOptions(numCandidates)
40 .filter(criteria);
41
42 // define pipeline
43 List<Bson> pipeline = asList(
44 vectorSearch(
45 fieldSearchPath,
46 queryVector,
47 indexName,
48 limit,
49 options),
50 project(
51 fields(exclude("_id"), include("title"), include("plot"), include("year"),
52 include("genres"), metaVectorSearchScore("score"))));
53
54 // run query and print results
55 collection.aggregate(pipeline)
56 .forEach(doc -> System.out.println(doc.toJson()));
57 }
58 }
59}
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
javac AtlasVectorSearchTutorial.java
java AtlasVectorSearchTutorial
1{
2 "plot": 'Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...',
3 "genres": [ 'Action', 'Adventure', 'Comedy' ],
4 "title": '3 Ninjas: High Noon at Mega Mountain',
5 "year": 1998,
6 "score": 0.7746343612670898
7},
8{
9 "plot": "A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...",
10 "genres": [ 'Action', 'Adventure', 'Family' ],
11 "title": 'White Wolves: A Cry in the Wild II',
12 "year": 1993,
13 "score": 0.770106315612793
14},
15{
16 "plot": 'A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.',
17 "genres": [ 'Action', 'Adventure', 'Sci-Fi' ],
18 "title": 'Space Raiders',
19 "year": 1983,
20 "score": 0.7569591999053955
21},
22{
23 "plot": 'Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.',
24 "genres": [ 'Adventure', 'Family', 'Fantasy' ],
25 "title": 'The Ewok Adventure',
26 "year": 1984,
27 "score": 0.7515435218811035
28},
29{
30 "plot": 'A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.',
31 "genres": [ 'Adventure', 'Comedy', 'Fantasy' ],
32 "title": 'Time Bandits',
33 "year": 1981,
34 "score": 0.7513599395751953
35},
36{
37 "plot": 'A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.',
38 "genres": [ 'Adventure', 'Family', 'Fantasy' ],
39 "title": 'Chitty Chitty Bang Bang',
40 "year": 1968,
41 "score": 0.7492260932922363
42},
43{
44 "plot": 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
45 "genres": [ 'Action', 'Adventure', 'Comedy' ],
46 "title": 'Forest Warrior',
47 "year": 1996,
48 "score": 0.7473714351654053
49},
50{
51 "plot": 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.',
52 "genres": [ 'Action', 'Adventure', 'Comedy' ],
53 "title": 'Forest Warrior',
54 "year": 1996,
55 "score": 0.7473714351654053
56},
57{
58 "plot": 'A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.',
59 "genres": [ 'Action', 'Fantasy', 'Adventure' ],
60 "title": 'Warriors of Virtue',
61 "year": 1997,
62 "score": 0.7464213371276855
63},
64{
65 "plot": 'A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...',
66 "genres": [ 'Animation', 'Adventure', 'Fantasy' ],
67 "title": 'Taxandria',
68 "year": 1994,
69 "score": 0.7453246116638184
70}
javac AtlasVectorSearchTutorial.java
java AtlasVectorSearchTutorial
1{
2 "plot": "Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.",
3 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
4 "title": 'Star Wars: Episode IV - A New Hope',
5 "released": ISODate('1977-05-25T00:00:00.000Z'),
6 "score": 0.79868483543396
7},
8{
9 "plot": "A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.",
10 "genres": [ 'Action', 'Adventure', 'Sci-Fi' ],
11 "title": 'Dune',
12 "released": ISODate('1984-12-14T00:00:00.000Z'),
13 "score": 0.7949700355529785
14},
15{
16 "plot": 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
17 "genres": [ 'Action', 'Adventure', 'Sci-Fi' ],
18 "title": 'Message from Space',
19 "released": ISODate('1978-10-30T00:00:00.000Z'),
20 "score": 0.7913978099822998
21},
22{
23 "plot": 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...',
24 "genres": [ 'Action', 'Adventure', 'Sci-Fi' ],
25 "title": 'Message from Space',
26 "released": ISODate('1978-10-30T00:00:00.000Z'),
27 "score": 0.7913978099822998
28},
29{
30 "plot": 'After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.',
31 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
32 "title": 'Star Wars: Episode V - The Empire Strikes Back',
33 "released": ISODate('1980-06-20T00:00:00.000Z'),
34 "score": 0.7809884548187256
35},
36{
37 "plot": 'After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.',
38 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
39 "title": 'Star Wars: Episode VI - Return of the Jedi',
40 "released": ISODate('1983-05-25T00:00:00.000Z'),
41 "score": 0.7784996032714844
42},
43{
44 "plot": 'Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.',
45 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
46 "title": 'Star Wars: Episode I - The Phantom Menace',
47 "released": ISODate('1999-05-19T00:00:00.000Z'),
48 "score": 0.7766742706298828
49},
50{
51 "plot": 'The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...',
52 "genres": [ 'Adventure', 'Family', 'Fantasy' ],
53 "title": 'Ewoks: The Battle for Endor',
54 "released": ISODate('1985-11-24T00:00:00.000Z'),
55 "score": 0.7676119804382324
56},
57{
58 "plot": 'A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.',
59 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
60 "title": 'Krull',
61 "released": ISODate('1983-07-29T00:00:00.000Z'),
62 "score": 0.7624373435974121
63},
64{
65 "plot": 'An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.',
66 "genres": [ 'Action', 'Adventure', 'Fantasy' ],
67 "title": 'Starcrash',
68 "released": ISODate('1979-03-09T00:00:00.000Z'),
69 "score": 0.7582714557647705
70}
1
2

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1const { MongoClient } = require("mongodb");
2
3// connect to your Atlas cluster
4const uri = "<connection-string>";
5
6const client = new MongoClient(uri);
7
8async function run() {
9 try {
10 await client.connect();
11
12 // set namespace
13 const database = client.db("sample_mflix");
14 const coll = database.collection("embedded_movies");
15
16 // define pipeline
17 const agg = [
18 {
19 '$vectorSearch': {
20 'index': 'vector_index',
21 'path': 'plot_embedding_voyage_3_large',
22 'filter': {
23 '$and': [
24 {
25 'genres': {
26 '$nin': [
27 'Drama', 'Western', 'Crime'
28 ],
29 '$in': [
30 'Action', 'Adventure', 'Family'
31 ]
32 }
33 }, {
34 'year': {
35 '$gte': 1960,
36 '$lte': 2000
37 }
38 }
39 ]
40 },
41 'queryVector': [-0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558],
42 'numCandidates': 200,
43 'limit': 10
44 }
45 }, {
46 '$project': {
47 '_id': 0,
48 'title': 1,
49 'genres': 1,
50 'plot': 1,
51 'year': 1,
52 'score': {
53 '$meta': 'vectorSearchScore'
54 }
55 }
56 }
57 ];
58
59 // run pipeline
60 const result = coll.aggregate(agg);
61
62 // print results
63 await result.forEach((doc) => console.dir(JSON.stringify(doc)));
64 } finally {
65 await client.close();
66 }
67}
68run().catch(console.dir);

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1const { MongoClient } = require("mongodb");
2
3// connect to your Atlas cluster
4const uri = "<connection-string>";
5
6const client = new MongoClient(uri);
7
8async function run() {
9 try {
10 await client.connect();
11
12 // set namespace
13 const database = client.db("sample_mflix");
14 const coll = database.collection("embedded_movies");
15
16 // define pipeline
17 const agg = [
18 {
19 '$vectorSearch': {
20 'index': 'vector_index',
21 'path': 'plot_embedding_voyage_3_large',
22 'filter': {
23 '$or': [
24 {
25 'genres': {
26 '$ne': 'Crime'
27 }
28 }, {
29 '$and': [
30 {
31 'year': {
32 '$lte': 2015
33 }
34 }, {
35 'genres': {
36 '$eq': 'Action'
37 }
38 }
39 ]
40 }
41 ]
42 },
43 'queryVector': [-0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494],
44 'numCandidates': 200,
45 'limit': 10
46 }
47 }, {
48 '$project': {
49 '_id': 0,
50 'title': 1,
51 'genres': 1,
52 'plot': 1,
53 'released': 1,
54 'score': {
55 '$meta': 'vectorSearchScore'
56 }
57 }
58 }
59 ];
60
61 // run pipeline
62 const result = coll.aggregate(agg);
63
64 // print results
65 await result.forEach((doc) => console.dir(JSON.stringify(doc)));
66 } finally {
67 await client.close();
68 }
69}
70run().catch(console.dir);
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4

次のコマンドを実行して、コレクションをクエリします。

node atlas-vector-search-tutorial.js
'{"plot":"Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...","genres":["Action","Adventure","Comedy"],"title":"3 Ninjas: High Noon at Mega Mountain","year":1998,"score":0.7746343612670898}'
`{"plot":"A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...","genres":["Action","Adventure","Family"],"title":"White Wolves: A Cry in the Wild II","year":1993,"score":0.770106315612793}`
'{"plot":"A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.","genres":["Action","Adventure","Sci-Fi"],"title":"Space Raiders","year":1983,"score":0.7569591999053955}'
'{"plot":"Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.","genres":["Adventure","Family","Fantasy"],"title":"The Ewok Adventure","year":1984,"score":0.7515435218811035}'
'{"plot":"A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.","genres":["Adventure","Comedy","Fantasy"],"title":"Time Bandits","year":1981,"score":0.7513599395751953}'
'{"plot":"A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.","genres":["Adventure","Family","Fantasy"],"title":"Chitty Chitty Bang Bang","year":1968,"score":0.7492260932922363}'
'{"plot":"A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.","genres":["Action","Adventure","Comedy"],"title":"Forest Warrior","year":1996,"score":0.7473714351654053}'
'{"plot":"A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.","genres":["Action","Adventure","Comedy"],"title":"Forest Warrior","year":1996,"score":0.7473714351654053}'
'{"plot":"A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.","genres":["Action","Fantasy","Adventure"],"title":"Warriors of Virtue","year":1997,"score":0.7464213371276855}'
'{"plot":"A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...","genres":["Animation","Adventure","Fantasy"],"title":"Taxandria","year":1994,"score":0.7453246116638184}'
node atlas-search-tutorial.js
`{"plot":"Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.","genres":["Action","Adventure","Fantasy"],"title":"Star Wars: Episode IV - A New Hope","released":"1977-05-25T00:00:00.000Z","score":0.79868483543396}`
`{"plot":"A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.","genres":["Action","Adventure","Sci-Fi"],"title":"Dune","released":"1984-12-14T00:00:00.000Z","score":0.7949700355529785}`
'{"plot":"In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...","genres":["Action","Adventure","Sci-Fi"],"title":"Message from Space","released":"1978-10-30T00:00:00.000Z","score":0.7913978099822998}'
'{"plot":"In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...","genres":["Action","Adventure","Sci-Fi"],"title":"Message from Space","released":"1978-10-30T00:00:00.000Z","score":0.7913978099822998}'
'{"plot":"After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.","genres":["Action","Adventure","Fantasy"],"title":"Star Wars: Episode V - The Empire Strikes Back","released":"1980-06-20T00:00:00.000Z","score":0.7809884548187256}'
'{"plot":"After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.","genres":["Action","Adventure","Fantasy"],"title":"Star Wars: Episode VI - Return of the Jedi","released":"1983-05-25T00:00:00.000Z","score":0.7784996032714844}'
'{"plot":"Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.","genres":["Action","Adventure","Fantasy"],"title":"Star Wars: Episode I - The Phantom Menace","released":"1999-05-19T00:00:00.000Z","score":0.7766742706298828}'
'{"plot":"The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...","genres":["Adventure","Family","Fantasy"],"title":"Ewoks: The Battle for Endor","released":"1985-11-24T00:00:00.000Z","score":0.7676119804382324}'
'{"plot":"A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.","genres":["Action","Adventure","Fantasy"],"title":"Krull","released":"1983-07-29T00:00:00.000Z","score":0.7624373435974121}'
'{"plot":"An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.","genres":["Action","Adventure","Fantasy"],"title":"Starcrash","released":"1979-03-09T00:00:00.000Z","score":0.7582714557647705}'
1
2

次のクエリは、$vectorSearch パイプライン ステージを使用して、指定されたベクター埋め込みに一致する映画を検索します。クエリは、最大 100 件の最近傍を検索し、結果を 10 件のドキュメントのみに制限します。クエリは、次のアクションを実行するための $project ステージも指定します。

  • _idフィールドを除外し、結果にはtitlegenresplot 、およびyearフィールドのみが含まれます。

  • 結果内の各ドキュメントのベクトル検索スコアを表示するscoreという名前のフィールドを追加します。

次のクエリは、文字列 kids adventure のベクトル埋め込みを使用して、plot_embedding_voyage_3_large フィールドを検索します。フィールドごとに複数の比較クエリ演算子を指定して、セマンティック検索を実行するドキュメントを事前にフィルタリングします。

フィルターでは、 $and集計パイプライン演算子を使用して、次の両方の条件に一致するドキュメントを検索します。

  • genresフィールドでフィルタリングして、 dramawestern 、またはcrimeジャンルではなく、 actionadventure 、またはfamilyジャンルに含まれる映画を検索します。

  • yearフィールドでフィルタリングして、 1960から2000年(両端を含む)の間にリリースされた映画を検索します。

1import pymongo
2
3# connect to your Atlas cluster
4client = pymongo.MongoClient("<connection-string>")
5
6# define pipeline
7pipeline = [
8 {
9 '$vectorSearch': {
10 'index': 'vector_index',
11 'path': 'plot_embedding_voyage_3_large',
12 'filter': {
13 '$and': [
14 {
15 'genres': {
16 '$nin': [
17 'Drama', 'Western', 'Crime'
18 ],
19 '$in': [
20 'Action', 'Adventure', 'Family'
21 ]
22 }
23 }, {
24 'year': {
25 '$gte': 1960,
26 '$lte': 2000
27 }
28 }
29 ]
30 },
31 'queryVector': [-0.021090532,-0.026399033,-0.024103465,-0.025538195,-0.000549233,0.011836523,-0.013199517,-0.003766167,-0.005165028,-0.02238179,0.037876874,0.010617003,0.010903949,-0.001354026,0.006850836,-0.018005863,-0.02195137,0.019512329,-0.041894119,-0.008357302,0.027546817,-0.025251249,0.004340059,-0.02195137,-0.003748232,-0.006205208,0.021377478,0.008931194,-0.00173961,-0.009827901,-0.016642869,-0.033572685,-0.026399033,0.015208139,0.010114847,-0.0233861,-0.011406104,-0.033142265,-0.008895326,-0.014347301,-0.019081909,-0.049067769,0.034433521,-0.023673046,0.004160717,-0.01334299,-0.06714537,0.032568373,-0.022525262,-0.024677357,0.011334368,0.027403345,0.026399033,-0.016786342,-0.015925504,0.013916882,-0.005487842,-0.0233861,0.026542507,-0.052798066,-0.025681669,-0.025394723,0.014203828,0.014921193,-0.031564061,0.010760476,0.010688739,0.013916882,-0.037876874,0.039598551,-0.000816003,0.003766167,-0.001694775,0.026972925,-0.009469219,0.015351612,-0.007245387,0.028981548,-0.035724778,0.010688739,0.001228488,0.004106915,-0.024677357,0.028551128,-0.033716157,-0.013486463,0.018292809,-0.018221073,0.009612692,-0.003622693,-0.001138817,-0.021234006,-0.045624416,0.020803586,0.007675806,-0.009612692,-0.021664424,-0.026685979,-0.025968615,0.001775478,-0.007496465,0.02051664,-0.054519743,0.018221073,0.014132091,-0.009684428,-0.025825141,-0.014921193,-0.057389203,-0.020660114,-0.028264182,-0.008931194,-0.019942747,-0.003228143,-0.014419037,0.021234006,-0.004573202,0.007317123,0.018651491,-0.016571132,-0.036155198,-0.032855317,0.000726332,-0.031851009,0.018938437,0.021234006,-0.048206929,0.017934127,-0.013414727,-0.009469219,0.064849801,0.006348681,-0.039024659,0.021377478,-0.022668736,-0.026829453,-0.019081909,0.027977237,-0.004627005,-0.038450766,0.004465597,-0.041894119,0.008213829,0.03055975,0.052224174,-0.00277979,-0.032137953,-0.013629936,0.022094844,-0.005918262,0.020660114,0.010617003,-0.020373167,-0.001614071,0.021090532,-0.005523711,0.004878082,-0.021090532,0.029698912,0.000726332,0.003371616,-0.022238316,0.008715985,0.038737711,0.013486463,-0.008536644,0.040172443,0.017503707,-0.028838074,0.061693393,-0.003066736,0.008285566,-0.034576993,0.01578203,-0.02238179,0.015925504,0.066571474,-0.038737711,-0.050215553,0.009325746,-0.010903949,-0.041607171,-0.006384549,0.026972925,-0.000119374,-0.003066736,-0.024103465,0.005093292,0.028981548,0.026829453,-0.001703742,0.043041904,0.010186584,0.010688739,0.004357993,-0.016571132,-0.010545266,-0.033142265,-0.005559579,-0.000365408,-0.00717365,0.019655801,0.047633037,0.044476632,0.01456251,-0.002977065,0.025681669,-0.015423348,-0.02051664,-0.019512329,0.014705983,0.002977065,0.03055975,-0.014347301,0.024390411,0.005882393,-0.012195205,0.004071047,-0.028694602,0.031277116,-0.010114847,0.005272633,0.017934127,0.037589926,-0.046198308,-0.02195137,-0.037876874,0.021234006,-0.034720469,-0.018005863,0.03055975,-0.015495085,-0.035150886,0.004178651,0.005882393,0.075753748,0.00595413,-0.083214343,-0.016284186,0.022238316,-0.032998793,-0.00491395,-0.009254009,-0.007819279,0.046198308,-0.008464907,0.014634247,0.031707536,-0.00317434,-0.026255561,-0.010617003,-0.033285737,0.020086221,-0.016858079,-0.012195205,-0.041894119,0.000721849,0.038163818,0.02238179,0.011406104,0.010330057,0.032137953,-0.01047353,0.039311603,-0.01291257,-0.03099017,-0.018938437,-0.013271254,-0.001820314,-0.005380238,0.003299879,-0.024533885,-0.001093982,0.012123469,-0.005236765,0.014132091,-0.018221073,0.013629936,0.022238316,-0.00317434,0.034003101,0.019081909,0.008034488,-0.02912502,0.026542507,-0.011334368,-0.077475421,0.038163818,-0.003568891,0.019081909,0.019512329,0.002385239,-0.032568373,-0.020373167,0.038737711,-0.013773409,0.01621245,-0.028407656,-0.021090532,-0.004411795,-0.013916882,-0.001533368,0.004322124,-0.024820831,0.004627005,-0.004591136,0.014849456,-0.014275564,-0.020229694,0.0233861,0.015566821,0.022525262,-0.024390411,-0.028694602,0.001766511,-0.036011726,0.006456285,-0.011262631,0.005523711,0.012266942,-0.019225383,-0.015423348,0.011836523,-0.011334368,-0.009827901,-0.011119158,0.007030177,0.00277979,0.004537334,-0.016571132,0.013127781,-0.013701673,-0.016571132,0.002941197,0.000959476,-0.004483532,0.010760476,0.043041904,-0.032568373,-0.015423348,0.006169339,-0.02094706,-0.050215553,0.012769097,0.015495085,0.001318158,0.00164994,-0.045337472,0.001533368,0.005595447,0.039311603,-0.030703224,0.023242628,-0.008787721,-0.021234006,-0.021234006,-0.001524401,0.007281255,0.01334299,0.00164994,-0.005451974,-0.011047422,-0.021234006,-0.033572685,-0.015423348,-0.005236765,0.025681669,-0.02051664,-0.024103465,-0.021377478,-0.00738886,-0.031707536,0.017790653,-0.026829453,0.007783411,-0.003335747,0.024677357,0.006384549,0.035724778,-0.004017244,-0.018651491,-0.014060355,-0.029842386,-0.012553888,0.006994309,-0.00317434,0.018292809,0.019942747,-0.01169305,0.002456975,0.010330057,-0.031707536,0.00799862,-0.019655801,-0.006205208,-0.012769097,-0.035294361,0.026112087,-0.004483532,0.02094706,0.019081909,0.001676841,-0.040746335,-0.004035179,-0.014992929,0.004375927,-0.049928606,-0.02051664,0.004268322,0.015351612,-0.037016038,-0.001452664,-0.021234006,-0.005738921,-0.051650282,-0.008285566,0.012840834,-0.015925504,0.018794963,-0.001228488,-0.035868254,-0.00347922,-0.003264011,0.002528712,0.01477772,-0.010545266,0.018221073,0.018149335,-0.028838074,-0.012984307,-0.037302982,-0.041607171,-0.043328848,-0.019799275,-0.019225383,-0.011047422,0.011908259,0.021664424,-0.012553888,0.004662873,0.005451974,-0.024533885,0.0067791,0.022812208,-0.037589926,-0.031564061,0.007101914,-0.00760407,-0.025107777,0.015566821,0.020803586,-0.033572685,0.062841177,0.034146577,-0.007532333,-0.001865149,-0.023673046,0.032424901,0.018508019,-0.005703052,-0.015853768,0.019655801,0.042181063,0.006671495,-0.004573202,0.024390411,0.009756165,-0.00029143,0.000107605,0.032711845,-0.005523711,-0.015566821,0.009110536,0.017216761,0.006241076,-0.003945508,0.007783411,0.024246939,0.048206929,0.00277979,-0.002367305,-0.05107639,-0.016284186,-0.016929815,0.016858079,0.000703914,-0.021234006,0.021234006,-0.014634247,0.001389895,0.008321434,-0.016499396,0.014921193,0.025394723,0.035437834,0.013486463,-0.022668736,-0.012338678,-0.034003101,-0.005559579,-0.008106225,0.023959992,-0.019368855,0.024533885,-0.000600793,0.009756165,-0.001936886,-0.014490774,0.018077599,0.004447663,0.011262631,-0.003658562,0.043328848,-0.018938437,0.00799862,-0.018221073,0.041320227,0.000363166,-0.003730298,0.002851526,-0.024103465,0.003515089,-0.0135582,-0.003497155,-0.006814968,0.014060355,0.027116399,-0.003192274,0.011406104,0.042468011,-0.036442146,-0.007245387,0.032424901,-0.038737711,0.008680117,-0.035581306,0.027546817,0.021664424,-0.000757717,-0.022238316,0.018221073,-0.006205208,0.005093292,0.001264356,-0.002116227,0.001098465,0.017431971,-0.042181063,0.010760476,0.033285737,0.002708053,-0.007352991,-0.009827901,-0.031994481,-0.020803586,0.009971374,-0.014849456,-0.003658562,0.024964303,-0.001793413,0.021090532,0.01578203,0.012984307,0.006922573,-0.032711845,-0.013701673,0.00390964,0.017503707,-0.015351612,0.006922573,0.028694602,0.012266942,-0.027259871,0.007675806,-0.002295568,-0.020086221,0.00595413,-0.027833764,0.001551302,0.008644248,-0.002187963,0.00040576,0.024964303,0.013916882,-0.015925504,0.014347301,-0.011549577,0.018938437,-0.032424901,0.003730298,0.003281945,0.032998793,0.005595447,0.025681669,0.011047422,0.026399033,0.02912502,-0.006241076,0.004627005,0.024390411,0.001542335,-0.034576993,0.011477841,-0.00491395,-0.014347301,0.023529572,-0.004770477,-0.014921193,-0.028264182,0.02812071,0.00164994,0.008680117,-0.005416106,0.035581306,-0.02812071,0.006097603,-0.016355922,-0.010114847,0.033142265,-0.021807898,0.001228488,-0.002170029,-0.032711845,0.018149335,0.014132091,0.03055975,0.031133642,-0.011979996,0.008967063,-0.013486463,-0.02812071,0.052224174,0.004124849,-0.008715985,-0.034863941,0.025251249,0.07977099,-0.000072297,-0.014705983,0.033142265,0.024103465,-0.004232454,-0.007496465,-0.024246939,-0.029698912,-0.009469219,0.010114847,0.001201586,0.00860838,0.012051732,-0.006025866,0.014490774,0.014992929,0.01169305,-0.003192274,0.005308501,0.0045194,0.017575443,0.001022245,-0.018794963,-0.001847215,0.011119158,0.02051664,-0.006886704,0.010330057,-0.003353682,0.018794963,0.013773409,0.026399033,0.007962752,-0.018221073,-0.012553888,-0.003586825,-0.002170029,0.047633037,0.011908259,0.007209518,0.045624416,0.028694602,0.004357993,0.023959992,0.004232454,0.009182272,0.003012933,0.035294361,-0.055954475,0.014849456,0.012553888,0.004340059,-0.000511123,-0.024390411,0.011406104,0.013127781,0.013629936,-0.011406104,0.002582514,-0.004555268,0.005559579,0.000569409,0.017934127,-0.014060355,0.02912502,0.003819969,0.011190895,-0.011262631,0.017001551,0.012553888,-0.02238179,0.024246939,0.032281429,0.032711845,-0.016714605,-0.021520952,0.016355922,-0.011334368,-0.003891705,-0.008572512,-0.016929815,0.0135582,-0.057963096,0.015566821,0.001856182,-0.002456975,-0.000766684,0.005380238,0.000923607,0.035581306,0.005272633,-0.009612692,0.018651491,-0.023959992,-0.001416796,0.033285737,-0.002725987,0.024533885,-0.010186584,0.003802035,-0.029268494,-0.011764786,0.003837903,0.022955682,0.053945851,-0.002232799,0.019512329,0.014419037,0.028407656,0.004985687,0.00210726,0.005774789,0.032568373,-0.024964303,0.019655801,-0.012123469,0.031994481,0.015638558,0.038450766,-0.011979996,0.033716157,0.019368855,0.017431971,0.022668736,0.015423348,-0.001927919,-0.001102949,0.028694602,-0.013701673,-0.036155198,-0.010688739,0.000535782,-0.021807898,-0.005200896,-0.040459387,0.007137782,-0.006492154,-0.00277979,0.020803586,0.027833764,-0.000780134,0.000600793,-0.025538195,-0.011764786,0.021090532,0.028694602,-0.016929815,-0.025251249,0.029268494,-0.013271254,0.014634247,0.000376617,-0.025251249,-0.026255561,-0.037302982,0.003138472,-0.024677357,-0.019799275,0.025825141,-0.040746335,0.002510778,-0.031851009,-0.014347301,-0.00158717,-0.046772201,-0.028838074,0.006635627,-0.001058113,0.014132091,-0.00286946,0.019368855,0.007281255,0.036155198,0.065710634,0.018794963,-0.029268494,0.003461286,0.012984307,0.006133471,0.003497155,0.046198308,-0.014132091,-0.010186584,0.028981548,-0.000286946,-0.003102604,0.011190895,0.014490774,-0.020660114,-0.00347922,-0.004842214,-0.000506639,0.002600448,0.017073289,-0.011836523,-0.026685979,-0.023959992,0.023673046,-0.006958441,0.040172443,-0.031133642,0.009182272,-0.015638558,-0.002421107,0.004555268,0.014705983,-0.028407656,-0.014921193,-0.015710294,-0.008751853,-0.006420417,-0.038450766,-0.011908259,0.006133471,0.002474909,-0.008070357,-0.01025832,-0.011119158,0.004465597,0.010903949,0.009074667,0.030703224,-0.019368855,-0.007891015,0.007675806,-0.005093292,0.023099154,0.022094844,0.00738886,0.007066045,-0.023242628,-0.020660114,0.009397482,-0.006635627,0.009540955,0.006348681,-0.013773409,-0.000186067,-0.021234006,-0.017145025,-0.007030177,0.010114847,0.024390411,-0.024964303,-0.041033279,0.0135582,0.014060355,0.008715985,0.018794963,-0.039598551,-0.015208139,0.027977237,0.020086221,0.012195205,-0.010760476,-0.025538195,0.025394723,0.012697361,-0.053371958,-0.008249698,0.005846525,-0.045624416,-0.027977237,-0.012410415,-0.02195137,-0.022955682,0.011477841,0.026972925,-0.031420588,-0.012051732,-0.015925504,-0.004322124,-0.017145025,0.012840834,0.01578203,-0.010186584,-0.00091464,-0.028264182,0.00369443,-0.029985858,-0.009899638,0.018794963,0.053945851,0.007317123,-0.020086221,0.008967063,-0.001506467,-0.006850836,0.011477841,-0.003120538,-0.005631316,-0.027977237,0.01047353,0.003120538,-0.001354026,-0.004160717,-0.004698741,-0.049067769,0.021807898,-0.037589926,0.03672909,-0.004878082,-0.006241076,0.000049879,0.014203828,-0.027259871,0.004196586,-0.002421107,0.008106225,-0.00760407,-0.003802035,-0.016140714,0.038737711,-0.010043111,-0.037589926,-0.062267285,-0.001506467,-0.006384549,-0.012697361,-0.011190895,-0.01578203,0.014132091,-0.02238179,-0.024677357,0.011621314,-0.028407656,0.010688739,0.039311603,0.009254009,-0.009612692,-0.040459387,0.021234006,0.007926884,-0.057102256,-0.045624416,0.003497155,-0.003120538,-0.015853768,-0.006528022,0.011334368,-0.008177961,-0.033716157,0.010114847,0.035868254,-0.021807898,-0.010975685,-0.039024659,0.021234006,0.001990688,-0.009756165,-0.003819969,-0.033142265,-0.035150886,0.028407656,0.007711674,0.018364545,0.005416106,0.010545266,-0.032281429,0.01291257,0.003102604,-0.009756165,0.05107639,-0.001080531,-0.043615796,0.025968615,0.012697361,0.024820831,0.024246939,-0.020086221,-0.012195205,0.00760407,0.009540955,-0.003802035,0.043328848,-0.010043111,0.003891705,-0.054519743,0.043041904,-0.032711845,0.024820831,0.018651491,-0.008357302,0.009540955,-0.003156406,-0.019081909,-0.025825141,-0.02912502,0.026255561,-0.017216761,0.010401793,-0.028551128,-0.005200896,0.012625624,-0.008142093,0.039311603,-0.00082497,-0.003784101,0.037876874,0.006599758,-0.021520952,0.047633037,0.012410415,-0.01477772,0.023529572,0.004985687,-0.031707536,0.007675806,-0.017934127,-0.034863941,0.018794963,-0.011119158,-0.027546817,0.009612692,0.00760407,0.057102256,0.006241076,0.007281255,-0.007675806,-0.008285566,0.012553888,-0.007245387,0.016284186,-0.024964303,0.007030177,-0.011836523,-0.045050524,0.021090532,-0.021664424,0.00369443,0.037016038,-0.010186584,-0.00656389,0.016355922,0.019225383,0.009002931,-0.008034488,-0.004555268,0.046772201,-0.014347301,0.014347301,-0.023959992,0.017790653,0.031133642,-0.025825141,0.035581306,-0.012769097,0.017360235,0.024677357,0.000046517,0.010903949,0.011262631,-0.000573892,0.026829453,-0.024820831,-0.001309191,0.008177961,-0.002143128,-0.018651491,-0.026685979,-0.040172443,-0.018651491,0.007568201,-0.018794963,0.003281945,-0.014347301,0.005738921,-0.020373167,-0.02051664,-0.028551128,-0.040172443,-0.017718917,0.046198308,0.003802035,-0.005523711,0.07345818,0.000412485,-0.025968615,0.024246939,-0.024964303,0.024820831,0.005882393,0.011190895,0.020086221,-0.029411966,-0.029842386,0.006922573,-0.004286256,0.0233861,-0.0135582,0.000551474,0.026255561,0.019799275,0.003568891,-0.025681669,-0.009469219,-0.002636316,0.013486463,0.050215553,-0.040459387,-0.003622693,0.019225383,-0.015853768,-0.017001551,0.028407656,0.02812071,0.01477772,-0.007209518,0.046198308,0.024246939,0.035868254,-0.019225383,-0.030272804,0.006599758,0.000473013,-0.018364545,0.033429209,-0.0233861,0.021664424,0.028694602,-0.009684428,-0.002815658,0.015136402,0.006994309,0.017360235,-0.027116399,0.042181063,-0.018794963,-0.037589926,-0.018508019,-0.012266942,-0.00277979,-0.01334299,-0.020373167,-0.004949819,-0.018651491,0.026829453,-0.011979996,0.00799862,0.040459387,-0.00738886,0.008249698,0.017718917,-0.042754956,-0.011119158,-0.043615796,-0.009325746,-0.009612692,-0.008285566,-0.008213829,0.012625624,0.000919124,-0.041033279,0.000636661,-0.045911364,-0.001909984,-0.016642869,0.013414727,0.03055975,-0.013414727,0.010186584,0.056241419,-0.008321434,-0.000200638,0.006205208,0.012625624,0.009756165,-0.035294361,0.034003101,-0.023529572,0.031564061,-0.026399033,0.029268494,0.001183652,0.01334299,0.004035179,-0.00491395,-0.002241766,-0.011764786,0.029268494,-0.011621314,0.037302982,-0.020086221,0.018651491,-0.01578203,-0.025825141,0.002528712,0.057102256,0.046198308,-0.006169339,0.008249698,0.009397482,-0.008142093,-0.037876874,-0.041607171,-0.01169305,-0.013773409,-0.020086221,-0.038737711,-0.019799275,-0.035437834,0.019368855,-0.001246422,-0.013845146,-0.037876874,-0.006814968,-0.003066736,0.003730298,0.016499396,0.012840834,0.02051664,-0.006994309,0.009182272,-0.00738886,-0.000193913,-0.037016038,0.007281255,-0.016427658,-0.003568891,0.02912502,0.021807898,0.02912502,0.004124849,-0.012625624,0.02195137,-0.036155198,0.011334368,0.018651491,0.040459387,0.006205208,0.015064666,-0.023959992,0.017360235,-0.000567167,0.032998793,-0.023099154,0.075753748,-0.038737711,-0.005057423,-0.019799275,0.014849456,-0.050215553,-0.001111916,-0.006169339,0.009469219,-0.019081909,-0.013127781,-0.028838074,-0.013414727,-0.008213829,0.006312812,-0.008177961,-0.021664424,-0.010832212,-0.012697361,0.014634247,0.004393861,-0.045337472,-0.010975685,-0.030703224,-0.003228143,-0.014849456,-0.034003101,0.009612692,-0.004806346,-0.006492154,0.018938437,0.00277979,0.023816518,-0.003407484,-0.01169305,0.006276944,-0.024820831,0.00189205,0.006814968,-0.019655801,0.035294361,0.009038799,0.006922573,0.011334368,-0.018651491,-0.009899638,0.029985858,-0.008285566,-0.013845146,0.032424901,-0.024533885,-0.024677357,0.031420588,0.003604759,0.004232454,0.01578203,-0.025107777,0.003784101,0.006276944,-0.010832212,0.009074667,-0.040172443,0.048780821,0.02094706,-0.009110536,0.008680117,-0.014132091,0.023816518,0.012051732,-0.012123469,-0.032998793,-0.032424901,-0.021664424,-0.025538195,-0.01047353,0.009002931,-0.039311603,-0.004806346,0.023673046,-0.012123469,-0.006850836,-0.030272804,0.043615796,0.002456975,0.001273323,-0.007711674,-0.008177961,0.06714537,-0.043615796,0.017216761,0.00882359,-0.005416106,-0.014060355,0.034146577,-0.022812208,-0.009899638,-0.00390964,-0.032137953,0.007245387,0.047633037,-0.007352991,0.006097603,-0.019225383,-0.027833764,-0.010545266,0.002905329,-0.002797724,0.038450766,-0.013629936,-0.008106225,-0.001143301,-0.000014361,-0.043328848,0.029698912,0.027690291,0.002143128,0.012051732,-0.02812071,0.024677357,-0.012984307,0.008715985,-0.005523711,0.039024659,-0.020373167,-0.028838074,0.026972925,0.018364545,-0.010114847,-0.011406104,0.033572685,-0.028838074,0.024677357,-0.011836523,-0.009612692,-0.03672909,0.025107777,-0.025251249,-0.009182272,0.002618382,0.030416278,-0.003210209,0.033859629,-0.015208139,-0.015279875,0.010975685,0.014132091,-0.010545266,-0.002600448,0.003945508,-0.001990688,-0.008859458,0.024533885,0.027116399,-0.005487842,-0.028551128,0.008321434,0.016714605,0.010617003,0.043328848,0.025251249,-0.033429209,0.005667184,-0.012840834,0.037589926,-0.012482151,0.002546646,0.01477772,-0.003120538,0.012984307,-0.054232799,-0.013199517,-0.029985858,-0.023673046,-0.014992929,-0.010760476,0.0233861,-0.02912502,-0.020803586,-0.010545266,0.022238316,0.005021555,0.041033279,0.016140714,-0.006097603,0.015351612,-0.017790653,-0.007675806,-0.032281429,-0.012338678,0.02955544,-0.016427658,0.039885495,0.001192619,-0.006241076,-0.000663563,-0.008070357,-0.001452664,0.025681669,-0.020803586,-0.010401793,0.001443697,0.012410415,0.007926884,-0.034003101,0.017360235,0.000999828,0.019799275,-0.001102949,0.005918262,0.010545266,-0.023529572,0.016714605,0.016571132,0.003604759,0.016140714,-0.020660114,-0.007101914,0.014132091,-0.035437834,-0.018938437,0.019225383,-0.006886704,-0.03629867,0.010545266,-0.017216761,0.005595447,-0.022812208,0.009971374,0.003371616,-0.022955682,-0.013701673,-0.019368855,-0.022238316,0.004627005,0.008213829,0.002600448,0.012769097,-0.027116399,0.015279875,-0.017073289,-0.019512329,-0.010043111,0.003120538,0.0045194,-0.024246939,0.010903949,0.001667874,-0.008895326,0.031277116,-0.016571132,-0.012266942,0.006348681,0.048493877,-0.010186584,0.001506467,0.022955682,-0.012625624,0.018938437,-0.004698741,-0.009002931,0.008249698,0.035724778,0.002887394,-0.00399931,0.007747543,-0.000780134,-0.001389895,-0.003138472,-0.016284186,-0.041033279,-0.018364545,-0.001847215,-0.011190895,0.006061735,-0.044189688,0.033859629,-0.010043111,0.040172443,-0.025251249,-0.006241076,-0.01621245,-0.028694602,-0.001345059,-0.021377478,0.037876874,0.007675806,0.006528022,0.019942747,-0.006133471,0.014275564,-0.005380238,-0.043328848,-0.05825004,0.019512329,-0.00090119,-0.018364545,-0.023099154,-0.003407484,0.026829453,-0.06542369,-0.024677357,0.011262631,-0.002618382,-0.013916882,0.031133642,-0.016427658,-0.017934127,0.020086221,-0.009827901,0.009899638,0.011621314,-0.005308501,0.021377478,-0.011621314,0.009971374,-0.037876874,-0.013916882,0.014419037,-0.001748577,0.014132091,-0.026972925,0.002725987,-0.03672909,-0.004017244,0.005738921,0.001748577,-0.014921193,-0.013127781,0.033572685,-0.022094844,-0.038163818,-0.030129332,0.005057423,0.034576993,0.028264182,0.029698912,-0.003443352,0.022238316,-0.026255561,-0.029842386,0.001883083,-0.006241076,-0.032711845,0.008429039,0.019799275,0.015710294,-0.019368855,-0.00882359,-0.007101914,-0.013414727,-0.004698741,0.01477772,-0.015351612,-0.018508019,0.034290049,-0.012984307,0.008859458,-0.010688739,-0.000573892,0.028694602,0.002313502,0.023959992,-0.013199517,-0.004770477,-0.035294361,0.003228143,0.004949819,-0.041033279,-0.015638558,0.02812071,0.009612692,-0.010760476,-0.005057423,0.010043111,-0.035868254,-0.003192274,0.016427658,-0.007711674,0.012051732,-0.013773409,0.034720469,0.00760407,0.009469219,0.012840834,-0.007962752,-0.024677357,0.006348681,-0.01334299,-0.00308467,0.012984307,0.015208139,0.02955544,0.002116227,0.000403518,-0.02195137,-0.015136402,0.002905329,0.008321434,-0.028981548,-0.035294361,-0.024533885,0.002994999,-0.017073289,-0.021664424,0.013414727,0.006384549,-0.024964303,0.018508019,0.002941197,0.01047353,-0.022668736,0.00421452,-0.034433521,0.005380238,-0.018938437,0.017001551,0.019081909,-0.002636316,-0.006456285,0.008644248,0.008859458,0.011190895,-0.00760407,0.006707363,0.007066045,-0.017718917,0.012195205,-0.037589926,-0.001013278,-0.002456975,-0.003658562,0.016499396,-0.00286946,0.002851526,-0.013414727,0.027977237,-0.040459387,-0.000515606,0.017431971,-0.00882359,0.029985858,-0.007532333,-0.01169305,-0.011836523,0.022525262,0.004627005,0.027403345,-0.010688739,-0.011334368,-0.031564061,-0.018221073,0.023959992,-0.016858079,0.045624416,0.017288497,-0.023529572,-0.016786342,0.042181063,0.003748232,-0.017288497,-0.008142093,-0.004268322,0.040172443,-0.019368855,0.006671495,-0.001488532,0.042754956,-0.020229694,-0.028694602,-0.041033279,0.01047353,0.004286256,0.004411795,-0.019081909,0.020803586,0.03672909,-0.008142093,-0.008751853,0.001640973,-0.014347301,-0.038450766,0.000522331,-0.020229694,-0.018508019,0.035581306,0.050789446,0.055093635,-0.021807898,0.038163818,-0.011262631,0.025251249,-0.034290049,0.045050524,0.0067791,-0.02094706,-0.048206929,0.008859458,0.007137782,-0.024677357,0.012769097,0.006025866,-0.035294361,0.009612692,-0.04476358,0.007675806,0.037876874,0.005236765,0.001156751,0.012625624,0.01025832,0.023529572,0.015423348,0.004160717,-0.021664424,-0.017862389,0.015925504,0.041033279,0.023242628,0.019512329,0.037876874,-0.018005863,-0.006635627,0.001981721,0.016571132,0.009540955,0.010114847,0.008715985,0.006599758,0.012410415,0.005236765,-0.014992929,0.03099017,-0.002797724,-0.039885495,0.05825004,0.000159165,0.016140714,0.043041904,-0.000887739,0.008034488,0.024964303,-0.028838074,-0.015638558,0.009182272,-0.033859629,-0.001963787,-0.008070357,-0.009612692,-0.012410415,0.003676496,-0.047633037,0.005236765,0.032711845,0.002439041,0.017073289,-0.011621314,-0.011764786,-0.018651491,0.003927574,0.002456975,-0.019225383,0.018938437,0.046198308,0.019081909,-0.045624416,-0.015423348,0.009182272,0.020086221,0.008393171,-0.003855837,-0.019942747,-0.02094706,0.000883256,0.015064666,-0.010688739,0.011119158,0.015495085,0.014490774,-0.022238316,0.012051732,0.012769097,-0.019081909,-0.005344369,-0.011621314,0.017145025,-0.008249698,-0.005344369,0.022812208,0.002286601,-0.009002931,0.028407656,-0.001865149,-0.013701673,-0.013845146,-0.006492154,0.022812208,-0.030416278,-0.035294361,-0.042754956,-0.016284186,0.007137782,0.002510778,0.008572512,-0.013701673,0.00656389,-0.006671495,0.012697361,-0.022238316,-0.001856182,0.006276944,0.006599758,0.008680117,-0.006133471,0.006958441,-0.023816518,0.008177961,0.009254009,0.003335747,-0.006635627,-0.015853768,0.007532333,-0.048206929,-0.05825004,-0.025394723,-0.031420588,-0.001049146,0.021377478,-0.023816518,-0.046198308,0.026112087,0.0045194,-0.028694602,-0.007747543,-0.024533885,-0.024677357,-0.032281429,0.018794963,-0.032711845,-0.009684428,0.011190895,-0.001380928,0.015279875,-0.025107777,-0.005738921,-0.004340059,-0.002170029,-0.017718917,-0.020373167,0.010186584,-0.009971374,-0.025394723,0.003622693,-0.048493877,0.015638558,-0.036155198,-0.016427658,-0.000600793,0.003281945,0.022094844,-0.009110536,-0.017145025,-0.023242628,-0.014921193,0.023673046,0.02195137,-0.025394723,0.003371616,-0.032998793,-0.000959476,-0.037589926,-0.013271254,-0.04476358,-0.015423348,-0.018651491,-0.049067769,0.033429209,-0.002089326,-0.033716157,-0.000932575,-0.001080531,0.036155198,-0.004106915,0.005272633,-0.02195137,-0.010043111,-0.027403345,-0.035868254,0.006814968,0.039598551,0.037302982,-0.041320227,-0.025394723,-0.025394723,-0.000699431,0.003604759,0.016355922,-0.00799862,-0.006994309,0.035150886,0.020229694,-0.007747543,0.017647181,0.026399033,-0.030416278,-0.011908259,0.026542507,-0.012195205,0.034146577,-0.006169339,-0.008859458,0.0045194,0.019799275,-0.031277116,-0.022812208,0.007066045,0.039885495,0.001264356,-0.026542507,-0.016355922,0.002214865,-0.018938437,-0.02955544,-0.008070357,-0.006420417,-0.001389895,0.002241766,-0.018292809,0.016355922,-0.002134161,0.037302982,0.00180238,-0.013199517,-0.020086221,-0.011621314,0.021377478,-0.005272633,-0.02195137,-0.017216761,0.037876874,0.033142265,0.041607171,-0.011477841,0.031133642,-0.045050524,-0.003981376,-0.025394723,-0.031707536,0.024533885,0.032568373,0.028694602,-0.021090532,-0.019942747,0.054806691,-0.004483532,-0.020086221,-0.01599724,0.018651491,0.020373167,0.000504397,-0.007424728,-0.063702017,-0.014203828,0.030846696,-0.006599758,-0.027259871,-0.024103465,-0.020660114,-0.004985687,0.005559579,-0.034146577,-0.011549577,-0.00173961,0.008321434,0.007030177,-0.015638558],
32 'numCandidates': 200,
33 'limit': 10
34 }
35 }, {
36 '$project': {
37 '_id': 0,
38 'title': 1,
39 'genres': 1,
40 'plot': 1,
41 'year': 1,
42 'score': {
43 '$meta': 'vectorSearchScore'
44 }
45 }
46 }
47]
48
49# run pipeline
50result = client["sample_mflix"]["embedded_movies"].aggregate(pipeline)
51
52# print results
53for i in result:
54 print(i)

次のクエリは、ベクター埋め込みを使用して plot_embedding_voyage_3_large フィールドで star wars という文字列を検索します。集計パイプラインと比較クエリ演算子を指定し、演算子を組み合わせてデータをフィルタリングする方法を示します。

フィルターでは、 $or集計パイプライン演算子を使用して、次のいずれかの条件に一致する映画のドキュメントを検索します。

  • genresフィールドでフィルタリングして、 crimeジャンルに該当しない映画を検索します。

  • yearフィールドでフィルタリングして、 2015以前にリリースされた映画を検索し、 genresフィールドでフィルタリングしてactionジャンルの映画を検索します。

1import pymongo
2
3# connect to your Atlas cluster
4client = pymongo.MongoClient("<connection-string>")
5
6# define pipeline
7pipeline = [
8 {
9 '$vectorSearch': {
10 'index': 'vector_index',
11 'path': 'plot_embedding_voyage_3_large',
12 'filter': {
13 '$or': [
14 {
15 'genres': {
16 '$ne': 'Crime'
17 }
18 }, {
19 '$and': [
20 {
21 'year': {
22 '$lte': 2015
23 }
24 }, {
25 'genres': {
26 '$eq': 'Action'
27 }
28 }
29 ]
30 }
31 ]
32 },
33 'queryVector': [-0.025189938,0.014741838,-0.013024342,-0.0197512,0.011235285,0.004651551,0.043509893,0.003112961,0.013310592,-0.033348043,0.037212405,-0.021039322,-0.026048684,0.012809656,0.029483676,0.003578116,-0.044654887,0.032632418,0.014312465,-0.058967352,0.025333062,-0.055246111,0.02189807,-0.017604331,-0.002880384,0.045227386,0.004794675,0.017604331,0.023186192,-0.054673612,-0.011306847,-0.012523406,-0.012380281,0.002540462,0.015958399,-0.042364895,-0.001467028,-0.020180576,-0.058108605,-0.035065539,0.010090288,-0.033348043,0.058394853,-0.013883091,0.002048471,-0.020753073,-0.029769925,0.031916797,-0.014741838,-0.040933646,-0.004096943,0.020753073,-0.002540462,0.028052431,-0.02404494,0.006547953,-0.003578116,0.003757022,0.019178702,-0.037784904,-0.02833868,0.01753277,0.029769925,0.017747456,-0.031344298,0.022899942,0.006333265,0.010376536,-0.024474313,-0.012094032,-0.004651551,0.007764512,0.017962143,0.013811528,0.037212405,-0.03148742,0.000666424,0.024474313,-0.021325571,0.041219898,0.011235285,0.046658635,0.019035578,0.020753073,0.010662786,-0.001726441,-0.012738093,-0.027193682,-0.014598713,-0.013167467,0.013596841,0.001932183,-0.010304974,-0.007478263,0.005689205,0.002987727,0.005724986,0.002325775,0.002415228,-0.003828584,-0.029340552,-0.017318081,-0.070417322,0.003810694,-0.013453716,-0.001628043,-0.027909305,0.014026215,0.009589351,0.004902019,0.028768053,-0.005259831,-0.010448099,0.025189938,0.038357403,0.048662379,0.039788652,0.010448099,0.001574371,0.020323699,0.005510299,0.026907433,0.043223642,-0.001153942,-0.010233412,0.048376128,-0.056104861,0.006691077,0.015672149,-0.015028087,0.036210533,-0.009231539,0.010519661,0.022899942,0.025762435,-0.009052633,-0.0301993,0.032203045,-0.00522405,0.029626802,-0.02433119,-0.025619311,0.016674021,0.02404494,-0.009589351,-0.026334934,-0.04436864,-0.014455589,0.02619181,0.017604331,0.02189807,-0.007728731,-0.021611821,-0.03363429,0.008480135,-0.027479932,0.025046812,-0.006047016,0.020753073,0.01016185,-0.034063663,0.029483676,-0.019035578,0.041506145,0.013453716,-0.009159978,0.007549825,0.025189938,0.005152487,-0.009446226,-0.009016853,0.021325571,0.030771798,-0.046944883,0.001314958,0.021182448,0.047231134,-0.007048889,-0.030771798,-0.025905561,-0.000612752,-0.023186192,0.011378409,0.035065539,0.007979199,0.023901815,-0.004973582,0.005188268,-0.046944883,0.009374664,0.047231134,0.058967352,0.043509893,0.011449971,0.017174957,-0.024188064,-0.025476186,-0.02833868,0.033061791,0.015314337,-0.018749328,0.013382155,0.007048889,0.005975454,0.005295612,-0.013310592,-0.022756819,-0.012523406,-0.03363429,-0.014527151,0.011449971,0.01202247,0.044941138,-0.012594969,0.002862493,0.000572499,0.030628674,-0.0098756,0.020466823,0.059539851,-0.00370335,0.007335138,0.023901815,0.023758691,-0.005903892,0.003918037,0.013310592,0.010090288,-0.012809656,-0.010376536,-0.01109216,-0.008086543,0.012809656,-0.019894326,0.012738093,0.056391109,0.029340552,-0.04436864,-0.001619098,0.042364895,-0.027623056,0.011593096,-0.031916797,-0.0301993,0.032203045,-0.003757022,0.017174957,0.033491168,0.003900147,0.002325775,0.006726858,0.020180576,0.017389644,0.009088415,0.018319955,-0.003631788,0.00586811,-0.006691077,-0.014240902,-0.009052633,0.031630546,0.04436864,-0.022899942,-0.003327648,-0.006691077,0.013310592,-0.035924286,-0.008158104,-0.005116706,-0.040647399,0.002397338,0.014455589,-0.030342424,0.028624929,-0.031773672,0.043509893,-0.001833785,-0.025619311,0.032775544,-0.046944883,0.013739966,-0.030485548,0.018319955,0.016745584,-0.020323699,-0.015815273,-0.020896198,-0.015171212,0.026334934,0.035638034,0.008873728,0.003291867,-0.02647806,0.003649678,0.003613897,0.009804038,-0.013525278,0.005367174,0.007657168,-0.017103394,-0.015815273,-0.000398065,0.013310592,0.014240902,0.003935928,0.001735386,-0.018606203,0.008265448,-0.068127327,0.012165595,-0.007836075,0.02189807,-0.000983982,0.019178702,-0.009589351,-0.013739966,-0.007800293,0.040361151,0.027623056,-0.002540462,-0.03663991,0.011163722,-0.016316209,-0.006333265,-0.010877473,-0.023329318,-0.021468697,0.013596841,0.032059919,0.007442481,0.02433119,-0.003613897,-0.013596841,0.010448099,0.010877473,-0.0098756,0.033920541,-0.006691077,-0.039502401,-0.010877473,-0.016960271,0.014097777,-0.008122323,0.007478263,0.010018725,-0.030485548,-0.011020597,0.000317558,0.00461577,0.020466823,0.070703574,-0.024617439,0.002111088,-0.024617439,-0.004204286,-0.048662379,-0.006834202,0.027766181,-0.002504681,0.025189938,0.033920541,-0.02833868,-0.000773768,-0.03578116,0.015958399,0.006369046,0.033204917,-0.006762639,0.02003745,-0.020180576,0.015886836,-0.015385899,-0.029340552,-0.009446226,0.015529023,-0.010376536,-0.012881218,-0.000715623,0.014312465,-0.029197427,-0.000684315,0.000360048,0.015815273,-0.027050557,0.006655296,0.018892452,-0.021182448,0.031201173,0.014240902,-0.022756819,0.004365302,-0.020609949,0.008515916,-0.016244646,0.001162888,0.000084421,0.003273976,-0.017819017,0.000576971,0.020753073,-0.004794675,0.018105267,-0.013095905,-0.028052431,0.004114834,0.02833868,-0.027193682,-0.010877473,-0.002576244,0.011879345,-0.017819017,0.006726858,-0.021754947,-0.031773672,-0.013382155,0.024903689,0.013167467,0.000033964,0.034063663,0.022613693,-0.038357403,-0.010018725,-0.017174957,-0.004418973,0.02189807,-0.003166633,-0.009589351,0.009303101,-0.036496785,-0.005760767,-0.006583733,-0.003596007,0.014026215,-0.003828584,-0.02833868,-0.020896198,0.001449137,0.039502401,0.012881218,0.025476186,0.000961619,-0.025762435,0.002808821,0.034922414,0.004687332,-0.046658635,0.030914923,-0.036067411,0.008659041,-0.004025381,-0.0301993,-0.026048684,0.024760563,0.036496785,-0.029913051,0.015672149,0.007764512,0.01509965,0.010304974,-0.004490536,-0.007585606,-0.019464951,0.016602458,-0.007048889,-0.005510299,0.011163722,0.013739966,-0.034636162,0.020609949,-0.004418973,0.034636162,0.040933646,0.031773672,0.023758691,0.031344298,-0.006798421,0.026048684,-0.011521534,0.020753073,0.014384027,0.026334934,-0.034206789,-0.036067411,0.014598713,0.023758691,-0.039216153,0.003363429,0.002880384,-0.006726858,-0.000916892,-0.001395465,-0.009660914,0.032059919,0.008086543,0.029054303,-0.011593096,0.065551087,0.031058047,-0.041219898,-0.014097777,-0.017103394,0.016244646,-0.028911177,0.044654887,-0.030771798,0.024760563,0.02833868,0.018248392,0.026907433,-0.002227377,0.034063663,0.000167724,0.021039322,-0.018892452,0.012738093,-0.001395465,0.005760767,-0.024760563,-0.002683587,0.000230341,-0.0197512,0.009088415,-0.00400749,-0.026764309,-0.012881218,0.016101522,-0.009303101,0.015529023,-0.016817145,0.014312465,-0.030914923,-0.018463079,0.020323699,-0.023472441,-0.023758691,-0.005009362,0.018176829,0.012738093,0.009374664,-0.031916797,0.016387772,0.027479932,0.015529023,-0.021325571,0.020323699,-0.025476186,0.008515916,-0.039788652,-0.007979199,-0.009947163,-0.006869983,0.004758894,0.022613693,-0.013668403,-0.015171212,0.035351787,-0.022327444,0.019178702,0.000404774,-0.003524444,-0.012094032,0.023901815,-0.0400749,-0.004579989,0.00245101,0.013024342,0.015958399,0.009517789,0.034779288,0.021468697,0.00062617,0.007728731,-0.028195554,0.0301993,-0.002504681,0.008909509,0.004651551,-0.007013108,0.03148742,0.019608077,0.002540462,0.043509893,-0.006190141,0.024903689,0.010519661,0.018319955,0.010519661,0.009660914,0.000966091,-0.004454754,0.000299667,0.007907636,-0.018463079,0.004758894,-0.001851675,-0.002415228,0.010233412,-0.024617439,-0.030771798,0.018749328,0.003023508,0.005474518,-0.011521534,-0.008551697,0.007979199,0.03363429,0.000275068,0.007800293,0.0039896,0.00522405,-0.035924286,-0.01416934,0.02619181,-0.025476186,-0.033777416,0.021325571,-0.02218432,0.001833785,0.027766181,-0.006118578,0.032059919,0.038929902,0.003613897,0.031344298,-0.002737259,0.057536107,0.009732476,0.020753073,0.005402955,-0.047803629,-0.040933646,0.009052633,-0.030485548,0.018319955,0.025046812,-0.002361557,0.045513637,0.008766385,-0.031058047,0.014312465,0.002737259,-0.004186396,0.032059919,0.024617439,-0.012666531,0.006798421,0.02619181,-0.012523406,0.009947163,0.005617642,0.039216153,0.008766385,0.009517789,0.042651143,-0.012881218,0.007263576,-0.000514354,0.016817145,-0.048948627,0.018176829,0.034922414,0.005331393,0.000391356,-0.017604331,0.026048684,-0.011807784,0.017461207,0.012809656,0.029483676,-0.017174957,0.023472441,0.005188268,0.007585606,-0.034922414,0.069558576,0.023472441,-0.010304974,0.020180576,0.025046812,0.016459335,0.000317558,-0.018606203,0.066696085,0.011664659,0.025762435,-0.016888708,0.015314337,-0.009231539,0.016459335,-0.021325571,0.009303101,0.000840857,-0.014455589,0.00170855,0.014741838,-0.004168505,-0.009088415,-0.0074067,-0.004472645,0.002665696,0.023615567,0.038929902,-0.016960271,-0.027193682,0.03663991,-0.016530896,0.003256086,0.015171212,0.036926158,0.02433119,0.047231134,-0.049234878,0.009947163,-0.01109216,-0.014097777,-0.007585606,0.00338132,-0.008086543,0.018176829,-0.014527151,-0.000205742,-0.041219898,0.012666531,0.046086136,0.004025381,-0.0074067,0.033348043,-0.020896198,-0.000514354,0.033491168,0.004257958,0.02404494,-0.008372792,-0.021754947,0.037784904,0.013453716,0.013024342,-0.026334934,0.023758691,0.012094032,0.006297485,0.045227386,0.021039322,-0.020323699,0.005975454,0.008802165,0.00370335,0.006941545,-0.029340552,-0.008551697,-0.004454754,0.003488663,0.010662786,0.00801498,0.010090288,0.015600586,0.018105267,-0.020180576,-0.00307718,0.031630546,0.000644061,0.011950907,-0.023472441,0.01509965,-0.035924286,0.016459335,-0.027766181,-0.014598713,-0.021611821,-0.013310592,-0.021039322,-0.02189807,0.018606203,-0.007979199,0.018176829,0.022041194,-0.002916165,0.009088415,-0.00522405,-0.018176829,-0.031916797,-0.017318081,-0.025476186,-0.014527151,-0.017675893,-0.026621183,0.000362284,0.02619181,0.016101522,-0.013310592,0.021325571,0.027909305,0.016316209,0.006011235,0.008551697,0.030914923,-0.070703574,0.004794675,-0.019321827,-0.011163722,-0.014598713,-0.0197512,-0.005438737,-0.025189938,-0.037212405,0.004168505,-0.021754947,0.018033706,0.035065539,0.022756819,0.005581861,-0.007764512,-0.003005618,-0.003524444,0.006655296,-0.00170855,-0.046086136,-0.009374664,0.001744332,0.030056175,0.016674021,0.014312465,0.029054303,-0.009052633,0.005832329,-0.029197427,-0.004723113,0.032489292,0.022899942,-0.044941138,0.014026215,-0.007227794,-0.035494912,0.001261286,0.079004802,0.008122323,0.022041194,0.016602458,0.046658635,-0.016888708,-0.006547953,-0.016316209,0.002021636,-0.016745584,0.003792803,0.005116706,-0.037784904,-0.028481804,-0.014670276,-0.005259831,0.018892452,0.001252341,-0.068699829,-0.021611821,-0.015242774,-0.027050557,-0.032059919,0.026048684,-0.014240902,-0.007013108,0.014598713,-0.005474518,-0.007192013,-0.016817145,0.00400749,0.010519661,0.007657168,0.005295612,0.009124196,0.024474313,-0.019894326,-0.044941138,-0.022756819,-0.022327444,-0.041792396,0.027479932,-0.013668403,-0.036210533,0.001225505,0.009947163,-0.044654887,-0.02003745,0.031344298,-0.004186396,-0.009517789,0.000720096,-0.023901815,0.000670897,0.022899942,0.006619515,0.006512171,0.022327444,0.021468697,0.021611821,0.039216153,-0.019608077,0.028052431,-0.020466823,-0.0197512,0.004454754,0.026048684,-0.024617439,-0.000333212,0.002200541,-0.002629915,0.021611821,0.009374664,0.00894529,-0.057822354,-0.009660914,-0.002844602,0.020323699,0.000603807,0.018033706,-0.027050557,-0.004186396,-0.019608077,-0.021754947,0.009732476,0.01602996,-0.016960271,-0.001520699,-0.023615567,0.004383192,0.000925838,0.023043068,0.032775544,0.006404828,-0.010304974,0.019321827,0.017604331,-0.01230872,0.007657168,0.005402955,-0.03148742,-0.000550135,-0.002111088,-0.029626802,0.01323903,-0.033777416,0.006655296,0.035065539,-0.003256086,0.000907947,0.004025381,0.011020597,-0.04808988,0.02619181,0.015171212,0.023758691,0.014741838,-0.001359684,-0.041506145,-0.009088415,-0.012738093,0.000176669,0.033777416,0.024188064,-0.002307885,0.023901815,0.00034663,-0.024474313,-0.031773672,-0.023758691,-0.024474313,-0.011163722,0.000447265,0.005080925,-0.00123445,0.006297485,-0.031058047,-0.012738093,-0.003059289,-0.026907433,-0.015672149,-0.005760767,0.023043068,0.023043068,-0.015028087,0.017747456,0.013883091,-0.011807784,0.038357403,-0.016817145,0.014884963,0.017389644,-0.000599334,0.016602458,0.008086543,-0.039502401,0.050379876,-0.024474313,0.035351787,-0.023758691,0.002039526,0.004061162,-0.012165595,-0.020180576,0.001636988,-0.013883091,0.017389644,0.006225922,-0.03578116,-0.016817145,-0.001332848,-0.005617642,-0.008730603,-0.039216153,0.02433119,0.028052431,0.02833868,0.039502401,0.010233412,-0.006869983,0.021468697,0.002039526,-0.0197512,0.020753073,0.027050557,0.009517789,0.011449971,0.038929902,0.008873728,0.009374664,0.007871855,-0.006082797,-0.007156232,-0.014670276,-0.000447265,0.046944883,-0.015242774,-0.019894326,0.008158104,0.016173085,-0.018463079,0.034922414,-0.005009362,-0.000092248,0.005760767,0.006190141,-0.022613693,0.034206789,0.012523406,0.000992927,0.038071156,-0.048376128,-0.017747456,0.014384027,0.000751404,0.015314337,-0.010519661,0.058681104,0.013954652,0.022899942,-0.003757022,0.01416934,-0.000469628,-0.008337011,-0.001153942,0.02189807,-0.024760563,0.01416934,-0.012738093,-0.025046812,0.030771798,-0.046658635,-0.002137924,0.053242367,0.010090288,-0.046086136,0.016316209,-0.005295612,0.023043068,-0.023043068,0.010233412,-0.018319955,-0.017389644,0.030485548,0.009660914,0.017174957,0.050379876,-0.010304974,0.017819017,-0.000364521,0.011163722,0.001753277,0.010448099,0.013095905,0.008372792,-0.01109216,0.036926158,-0.015672149,-0.014598713,0.008981071,-0.011879345,-0.036926158,-0.01789058,-0.008694822,-0.028911177,-0.017103394,-0.028768053,-0.030914923,0.001033181,0.00431163,-0.024474313,-0.031058047,0.010018725,0.00647639,-0.027336806,0.025046812,0.003148742,-0.010018725,0.03663991,0.033348043,-0.001162888,-0.01016185,0.010376536,0.010519661,0.019178702,0.016101522,0.007943418,-0.013739966,-0.013525278,-0.027193682,0.006655296,0.027050557,-0.017389644,-0.027479932,0.041792396,0.045513637,-0.014741838,0.012451844,0.018319955,-0.00153859,0.010519661,0.017962143,-0.012594969,0.018606203,0.023472441,-0.034063663,-0.004061162,0.015600586,0.019178702,0.002361557,-0.025619311,-0.00586811,-0.02003745,0.013739966,0.017675893,-0.025189938,-0.002415228,0.001547535,0.019608077,0.039502401,-0.00184273,0.025189938,0.00277304,0.020323699,0.007227794,0.012165595,-0.00370335,0.02433119,-0.00586811,0.016459335,0.034206789,0.001051072,-0.010519661,-0.004096943,0.00153859,0.01574371,0.01230872,-0.007692949,-0.019464951,0.005116706,0.017389644,0.024903689,0.046658635,-0.010519661,0.020609949,0.060684849,-0.045227386,-0.008551697,-0.004293739,-0.001502809,-0.015815273,-0.005975454,0.000290722,0.027050557,-0.002245268,-0.016888708,-0.027193682,-0.001288122,-0.021182448,-0.041219898,0.031916797,0.030628674,-0.03234617,0.006655296,0.008372792,-0.009016853,-0.033348043,0.010877473,-0.05238362,-0.004490536,-0.028911177,0.006905764,-0.003506554,0.039788652,-0.036496785,-0.015886836,0.015314337,-0.015672149,0.006225922,-0.021182448,-0.034349915,-0.043223642,-0.025476186,0.002558353,0.007048889,-0.037784904,-0.014026215,-0.044654887,-0.036926158,0.008229667,0.007728731,0.039216153,-0.00027954,0.026907433,0.027193682,-0.017174957,-0.011378409,0.017174957,-0.015815273,0.009446226,0.033777416,-0.014384027,0.003721241,-0.024760563,-0.000229223,0.008802165,-0.000377939,-0.007692949,0.016173085,0.018248392,-0.02218432,-0.003202414,-0.033204917,-0.002969836,-0.023186192,0.030056175,-0.015457462,-0.015314337,-0.008981071,0.022613693,-0.014026215,-0.025476186,0.025333062,0.034206789,0.010662786,0.016387772,0.030342424,-0.008086543,0.007120451,0.000221396,0.025619311,0.01789058,-0.008086543,0.011807784,-0.016101522,0.002719368,0.005653423,0.017962143,-0.001941128,0.06297484,0.016244646,0.003524444,0.018749328,-0.001815894,0.006082797,0.069558576,-0.011020597,0.018033706,0.026621183,0.007692949,-0.008694822,0.035924286,-0.001878511,-0.005975454,-0.028911177,-0.007871855,0.014741838,0.008587479,0.026621183,0.005259831,-0.023186192,0.000368993,-0.01323903,0.002683587,-0.011306847,0.007478263,-0.000621698,0.022756819,-0.018892452,-0.013167467,0.007764512,-0.010877473,-0.017461207,-0.013525278,0.014240902,-0.019464951,-0.009016853,0.016173085,-0.027479932,0.002934055,0.042937394,-0.004830457,-0.031201173,-0.024188064,0.00245101,0.017318081,0.001824839,-0.022756819,0.021325571,-0.027479932,-0.008659041,0.008337011,-0.016674021,-0.003452882,0.000711151,-0.045799885,0.013739966,-0.029340552,-0.035208661,0.000554608,-0.007800293,0.018892452,0.028481804,-0.011593096,-0.00894529,0.024474313,-0.008050761,0.025476186,-0.001306012,-0.00214687,-0.008050761,-0.018606203,-0.006047016,-0.028768053,0.029197427,-0.021468697,0.005402955,-0.021039322,-0.014312465,-0.002325775,-0.020896198,0.000706678,0.035638034,-0.008480135,-0.035351787,0.014312465,0.012523406,0.011807784,0.003041399,-0.010018725,-0.022613693,-0.021182448,-0.005474518,-0.007120451,0.025476186,0.036926158,-0.007907636,-0.014097777,0.010519661,0.005617642,0.014670276,-0.011664659,0.011879345,-0.012738093,-0.007871855,-0.012666531,0.032918669,-0.010018725,0.007943418,0.024188064,0.005760767,-0.003918037,0.022613693,0.017318081,0.036496785,0.037784904,0.008694822,0.016674021,0.000106225,0.003685459,-0.031201173,-0.01016185,-0.02404494,-0.019035578,0.031773672,0.000975037,-0.032489292,-0.033920541,0.015385899,-0.023186192,0.012523406,-0.011163722,-0.005116706,0.015314337,-0.006834202,-0.038357403,-0.023472441,0.015529023,0.017747456,0.005653423,-0.002325775,0.009088415,-0.022899942,0.02433119,0.000849803,-0.042078644,-0.004257958,0.018176829,-0.0049378,-0.002415228,-0.016173085,0.012594969,0.013596841,-0.017031832,-0.001806949,-0.003810694,0.003005618,0.046944883,-0.025476186,0.012738093,0.009016853,-0.009660914,0.012666531,0.014026215,-0.010519661,0.022327444,0.00400749,-0.007478263,-0.03578116,0.009804038,-0.028911177,-0.018248392,0.004758894,0.005939673,0.033920541,-0.011378409,-0.005474518,0.012451844,0.018176829,0.033920541,0.025905561,-0.014670276,0.001798003,0.031344298,0.00431163,0.027193682,-0.006798421,0.011449971,0.00894529,0.013883091,0.023758691,-0.007692949,0.031344298,-0.014384027,-0.007514044,-0.026621183,-0.001645933,-0.010090288,-0.009589351,0.008193886,-0.007871855,-0.031773672,0.013525278,0.006583733,0.010949035,-0.004794675,-0.004061162,-0.021468697,0.011020597,-0.020609949,0.010018725,0.010662786,0.008158104,0.00370335,0.007800293,-0.029626802,0.029197427,-0.017174957,-0.00586811,-0.003112961,-0.018749328,-0.042364895,0.027050557,0.028624929,0.008837947,0.026334934,0.018248392,-0.004758894,0.009446226,-0.033061791,-0.022041194,-0.021039322,0.008086543,-0.009088415,-0.031630546,0.020896198,-0.018749328,0.022613693,-0.014097777,0.004347411,0.014813401,-0.013525278,-0.001726441,0.010448099,0.036067411,-0.026048684,-0.020753073,-0.005045144,0.033348043,-0.002576244,0.02404494,0.022041194,0.017031832,-0.000297431,-0.003184523,-0.012738093,0.022756819,-0.016888708,0.021039322,-0.000313085,0.032203045,-0.011235285,0.001583316,-0.00461577,-0.026334934,-0.002934055,-0.005939673,0.001458082,0.007156232,-0.005689205,-0.042937394,0.011378409,0.007156232,0.00554608,0.026621183,-0.014455589,-0.017604331,-0.02647806,-0.03578116,-0.009804038,0.006905764,-0.0197512,-0.035494912,-0.027623056,-0.00461577,0.011521534,0.006905764,0.009517789,0.003112961,0.033920541,-0.004687332,-0.005045144,-0.009231539,0.000126911,0.008694822,-0.029340552,0.011163722,0.047517382,-0.039788652,-0.033348043,-0.003041399,-0.007657168,-0.035065539,-0.012165595,-0.024617439,0.0049378,0.017461207,0.029626802,-0.004723113,-0.000366757,-0.041792396,0.041219898,-0.009446226,0.016960271,-0.017747456,-0.036067411,0.025046812,0.027336806,0.025905561,0.049234878,0.016602458,-0.005796548,0.021325571,-0.003524444,-0.000872166,0.014670276,0.020323699,0.002737259,0.009660914,-0.006440609,-0.062402345,-0.062688597,-0.008158104,-0.018749328,0.005438737,-0.002066362,0.000205742,-0.018749328,0.017103394,-0.03578116,0.000265004,-0.03663991,-0.024760563,0.054101113,-0.00647639,-0.026334934,0.034779288,0.022756819,-0.033348043,-0.02433119,-0.041792396,-0.014455589,-0.023329318,-0.004687332,-0.013453716,-0.018319955,-0.014455589,0.043509893,0.013453716,-0.014813401,0.009052633,-0.034349915,0.052097369,-0.003774913,0.016316209,-0.027050557,0.028195554,-0.007549825,-0.020466823,0.014598713,-0.005939673,0.003273976,-0.052097369,0.002701478,-0.02404494,-0.005903892,0.009947163,-0.00043161,0.02189807,0.042078644,-0.020609949,0.007836075,0.018892452,0.001207614,0.009159978,-0.029197427,-0.023329318,0.004347411,-0.019464951,0.020180576,0.019894326,0.00615436,0.021468697,-0.017461207,-0.011879345,-0.002307885,0.016101522,-0.029626802,-0.014455589,0.020323699,0.020753073,0.018176829,-0.006082797,0.027766181,0.016530896,-0.008444354,0.001806949,0.029626802,-0.012451844,0.023186192,0.006869983,-0.034063663,-0.012094032,-0.021611821,-0.008050761,0.05581861,-0.004257958,-0.025333062,-0.004526317,0.018033706,0.027479932,0.025476186,0.008802165,-0.009589351,0.012809656,0.012523406,0.0400749,0.018033706,0.011020597,0.014956526,0.013883091,-0.006655296,0.019608077,-0.03234617,0.007585606,-0.036067411,-0.024617439,-0.001628043,0.022041194,0.026764309,-0.038643654,-0.009124196,-0.020323699,-0.013883091,0.02404494,0.002361557,-0.03234617,-0.0049378,0.018606203,0.022327444,0.043509893,-0.030485548,-0.003560225,0.007442481,0.00370335,0.011449971,0.023472441,0.000197915,-0.011950907,0.023329318,-0.009804038,-0.025619311,0.0074067,-0.003953818,0.014312465,0.048662379,-0.027193682,0.019894326,-0.042364895,0.003327648,0.042937394,-0.040933646,-0.020466823,0.056104861,0.020896198,-0.014527151,-0.036210533,-0.022470569,0.035924286,-0.013167467,-0.055532362,-0.006190141,-0.027909305,0.012881218,0.003005618,0.005689205,0.01109216,-0.016387772,-0.021468697,0.018176829,-0.021611821,0.032918669,0.002951946,-0.008837947,-0.031773672,-0.029913051,0.017318081,0.017461207,-0.02833868,-0.027479932,-0.023615567,0.037212405,-0.023615567,-0.02404494,0.029626802,0.002951946,0.004043271,-0.001377575,0.007800293,0.024188064,-0.027336806,-0.002361557,-0.00307718,-0.025189938,0.007192013,-0.000207978,0.040933646,0.010877473,-0.000720096,-0.006941545,0.003059289,0.032775544,-0.007657168,0.019321827,-0.012094032,0.042078644,-0.010591224,0.011807784,-0.016173085,-0.015529023,-0.023615567,0.016173085,-0.018606203,0.007192013,-0.008587479,0.000257177,0.002245268,-0.011879345,0.044082388,-0.005939673,-0.003059289,-0.013954652,-0.026621183,0.039502401,-0.006440609,0.014384027,0.012094032,-0.034779288,-0.002379447,0.023329318,0.029483676,-0.002325775,-0.001565426,0.025619311,0.018606203,-0.016101522,-0.0301993,0.002576244,0.035208661,0.002325775,-0.011664659,-0.022470569,-0.047231134,-0.016888708,-0.017747456,0.05152487,0.009374664,-0.010591224,0.009303101,-0.005009362,-0.029197427,0.001726441,-0.023758691,-0.002934055,-0.017461207,0.018606203,-0.002665696,-0.003578116,-0.018606203,-0.004651551,-0.021325571,0.005367174,-0.009124196,0.016888708,-0.01295278,0.002048471,-0.011593096,0.017604331,-0.008515916,0.006082797,-0.036067411,-0.027336806,-0.010018725,-0.001306012,0.026334934,-0.019321827,-0.030914923,-0.026764309,-0.0024689,-0.005581861,-0.002755149,0.019464951,-0.01295278,0.011163722,0.000639588,0.025476186,0.029483676,0.042651143,-0.011306847,0.002737259,0.010090288,-0.015600586,0.038357403,0.029197427,-0.008193886,0.044082388,0.032489292,-0.00123445,-0.008372792,0.009124196,-0.00309507,-0.041792396,0.007764512,-0.009947163,0.044941138,0.030056175,-0.013024342,-0.019321827,0.019321827,0.008551697,-0.053814866,0.038071156,-0.037784904,0.012165595,-0.008444354,-0.029626802,-0.006905764,-0.028195554,-0.01080591,-0.0098756,-0.032203045,0.040361151,-0.033920541,0.004454754,-0.036067411,0.011879345,-0.011235285,0.020609949,-0.004579989,0.0074067,-0.017103394,0.01789058,0.011449971,-0.007836075,0.000427138,-0.007120451,0.008337011,0.00123445,-0.003273976,-0.007263576,-0.011449971,0.022756819,0.002576244,-0.013310592,-0.013382155,-0.011664659,-0.013453716,-0.005152487,-0.050379876,-0.034636162,-0.011306847,0.015028087,0.008480135,-0.047517382,-0.00586811,-0.008301229,-0.01416934,0.000876638,0.000326503,0.01080591,0.004150615,0.005259831,-0.008837947,0.017031832,-0.016316209,-0.036210533,-0.013883091,-0.000295195,0.014240902,0.020753073,-0.022899942,-0.038929902,0.00586811,-0.008050761,0.00016437,-0.001932183,0.001789058,0.017031832,0.045227386,-0.016745584,-0.005689205,0.008372792,0.008301229,-0.016674021,-0.004222177,0.005832329,0.016173085,-0.009374664,-0.006869983,-0.052669868,0.035065539,0.000123557,0.007478263,0.033491168,0.054387365,0.002254213,-0.007836075,-0.020323699,-0.019178702,-0.010376536,-0.039788652,-0.032632418,-0.012380281,-0.002540462,-0.016602458,-0.022756819,0.019608077,0.001887456,0.032918669,0.008050761,-0.013739966,0.006547953,-0.016674021,0.001574371,0.019321827,-0.016960271,-0.031201173,0.027766181,0.006655296,0.020753073,0.009804038,0.024903689,-0.043509893,0.015815273,-0.017962143,-0.043223642,0.033920541,-0.007764512,-0.006762639,0.017819017,-0.026621183,0.046658635,-0.004490536,0.024188064,-0.010304974,0.004651551,0.047231134,-0.038071156,0.009589351,-0.033920541,-0.027050557,0.050093625,0.008515916,-0.025189938,-0.008050761,0.011950907,0.004973582,0.014527151,-0.009374664,-0.003721241,0.019608077,0.049807377,0.016602458,0.02404494],
34 'numCandidates': 200,
35 'limit': 10
36 }
37 }, {
38 '$project': {
39 '_id': 0,
40 'title': 1,
41 'genres': 1,
42 'plot': 1,
43 'year': 1,
44 'score': {
45 '$meta': 'vectorSearchScore'
46 }
47 }
48 }
49]
50
51# run pipeline
52result = client["sample_mflix"]["embedded_movies"].aggregate(pipeline)
53
54# print results
55for i in result:
56 print(i)
3

<connection-string> を Atlas クラスターまたはローカル Atlas 配置の接続文字列に置き換えます。

接続stringには、次の形式を使用する必要があります。

mongodb+srv://<db_username>:<db_password>@<clusterName>.<hostname>.mongodb.net

詳しくは、ドライバーを使用してクラスターに接続する を参照してください。

接続stringには、次の形式を使用する必要があります。

mongodb://localhost:<port-number>/?directConnection=true

詳細については、「接続文字列 」を参照してください。

4
python atlas-vector-search-tutorial.py
{'plot': 'Three young boys, Rocky, Colt and Tum Tum together with their neighbor girl, computer whiz Amanda are visiting Mega Mountain amusement park when it is invaded by an army of ninjas led by ...', 'genres': ['Action', 'Adventure', 'Comedy'], 'title': '3 Ninjas: High Noon at Mega Mountain', 'year': 1998, 'score': 0.7746343612670898}
{'plot': "A two-week trek through the Cascade Mountains tries the survival instincts of five adventurous teenagers. At first, it's all a good time. Shooting the rapids, exploring caves and making new...", 'genres': ['Action', 'Adventure', 'Family'], 'title': 'White Wolves: A Cry in the Wild II', 'year': 1993, 'score': 0.770106315612793}
{'plot': 'A futuristic, sensitive tale of adventure and confrontation when a 10 year old boy is accidentally kidnapped by a spaceship filled with a motley crew of space pirates.', 'genres': ['Action', 'Adventure', 'Sci-Fi'], 'title': 'Space Raiders', 'year': 1983, 'score': 0.7569591999053955}
{'plot': 'Wicket the Ewok and his friends agree to help two shipwrecked human children on a quest to find their parents.', 'genres': ['Adventure', 'Family', 'Fantasy'], 'title': 'The Ewok Adventure', 'year': 1984, 'score': 0.7515435218811035}
{'plot': 'A young boy accidentally joins a band of dwarves as they jump from era to era looking for treasure to steal.', 'genres': ['Adventure', 'Comedy', 'Fantasy'], 'title': 'Time Bandits', 'year': 1981, 'score': 0.7513599395751953}
{'plot': 'A down-on-his-luck inventor turns a broken-down Grand Prix car into a fancy vehicle for his children, and then they go off on a magical fantasy adventure to save their grandfather in a far-off land.', 'genres': ['Adventure', 'Family', 'Fantasy'], 'title': 'Chitty Chitty Bang Bang', 'year': 1968, 'score': 0.7492260932922363}
{'plot': 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.', 'genres': ['Action', 'Adventure', 'Comedy'], 'title': 'Forest Warrior', 'year': 1996, 'score': 0.7473714351654053}
{'plot': 'A shape-shifting mountain man and a group of children team up to protect an enchanted forest from evil lumberjacks.', 'genres': ['Action', 'Adventure', 'Comedy'], 'title': 'Forest Warrior', 'year': 1996, 'score': 0.7473714351654053}
{'plot': 'A young boy is whisked away to the mythical land of Tao where he becomes the center of a conflict between an evil lord and a group of animal warriors.', 'genres': ['Action', 'Fantasy', 'Adventure'], 'title': 'Warriors of Virtue', 'year': 1997, 'score': 0.7464213371276855}
{'plot': 'A young prince is taken for tuition at a seaside hotel but there quickly bores and wanders off to visit a nearby lighthouse. Befriended by the keeper, he learns of a secret world he can see...', 'genres': ['Animation', 'Adventure', 'Fantasy'], 'title': 'Taxandria', 'year': 1994, 'score': 0.7453246116638184}
python atlas-vector-search-tutorial.py
{'year': 1977, 'plot': "Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the universe from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.", 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Star Wars: Episode IV - A New Hope', 'score': 0.79868483543396}
{'plot': "A Duke's son leads desert warriors against the galactic emperor and his father's evil nemesis when they assassinate his father and free their desert world from the emperor's rule.", 'genres': ['Action', 'Adventure', 'Sci-Fi'], 'title': 'Dune', 'year': 1984, 'score': 0.7949700355529785}
{'plot': 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...', 'genres': ['Action', 'Adventure', 'Sci-Fi'], 'title': 'Message from Space', 'year': 1978, 'score': 0.7913978099822998}
{'plot': 'In this Star Wars take-off, the peaceful planet of Jillucia has been nearly wiped out by the Gavanas, whose leader takes orders from his mother (played a comic actor in drag) rather than ...', 'genres': ['Action', 'Adventure', 'Sci-Fi'], 'title': 'Message from Space', 'year': 1978, 'score': 0.7913978099822998}
{'year': 1980, 'plot': 'After the rebels have been brutally overpowered by the Empire on their newly established base, Luke Skywalker takes advanced Jedi training with Master Yoda, while his friends are pursued by Darth Vader as part of his plan to capture Luke.', 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Star Wars: Episode V - The Empire Strikes Back', 'score': 0.7809884548187256}
{'plot': 'After rescuing Han Solo from the palace of Jabba the Hutt, the rebels attempt to destroy the second Death Star, while Luke struggles to make Vader return from the dark side of the Force.', 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Star Wars: Episode VI - Return of the Jedi', 'year': 1983, 'score': 0.7784996032714844}
{'plot': 'Two Jedi Knights escape a hostile blockade to find allies and come across a young boy who may bring balance to the Force, but the long dormant Sith resurface to reclaim their old glory.', 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Star Wars: Episode I - The Phantom Menace', 'year': 1999, 'score': 0.7766742706298828}
{'plot': 'The army of the Marauders, led by by King Terak and the witch Charal attack the Ewoks village. The parents and the brother of Cindel all die in this attack. Cindel and the Ewok Wicket ...', 'genres': ['Adventure', 'Family', 'Fantasy'], 'title': 'Ewoks: The Battle for Endor', 'year': 1985, 'score': 0.7676119804382324}
{'plot': 'A prince and a fellowship of companions set out to rescue his bride from a fortress of alien invaders who have arrived on their home planet.', 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Krull', 'year': 1983, 'score': 0.7624373435974121}
{'plot': 'An outlaw smuggler and her alien companion are recruited by the Emperor of the Galaxy to rescue his son and destroy a secret weapon by the evil Count Zarth Arn.', 'genres': ['Action', 'Adventure', 'Fantasy'], 'title': 'Starcrash', 'year': 1978, 'score': 0.7582714557647705}

戻る

ローカル RAG

ルール バッジを取得する

「Vector Search の基礎」を無料で習得できます。

詳細

項目一覧