Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
Atlas
/

Atlas ベクトル検索でのビューの使用

ビューに Atlas Vector Search インデックスを作成することで、ドキュメントやコレクションを変換し、コレクションの部分的なインデックス化、互換性のないデータ型やデータモデルのサポートなどを可能にします。

次の例では、sample_mflix サンプルデータベースを使用します。

注意

曖昧さ回避

このページでは標準ビューについて説明します。オンデマンドのマテリアライズドビューの詳細については、「オンデマンドのマテリアライズドビュー」を参照してください。

ビュー タイプの違いについては「オンデマンドのマテリアライズドビューとの比較」を参照してください。

MongoDB 8.0 以降を使用する必要があります。

ビューを編集するには、ユーザー管理者ロールを持ち、collMod データベース コマンドを使用する必要があります。

  • Atlas ベクトル検索 は、次のステージを持つビューをサポートしています。

  • インデックス名は、ソース コレクションとそのすべてのビューにわたって一意である必要があります。

  • Atlas Vector Search では、$$USER_ROLES システム変数や $rand 集計演算子などの動的な結果を生成する演算子を用いたビュー定義はサポートされません。

  • Atlas Vector Search クエリは、ソースコレクションに表示される元のドキュメントを返します。

ビューを作成するには、createCollection の権限が必要です。

ドキュメントをフィルターして、コレクションに部分的にインデックスを付けることができます。次の例では、sample_mflix.embedded_movies コレクションにビューを作成し、ベクトル埋め込みフィールドを持つドキュメントのみがインデックスされるようにします。


➤ [ 言語を選択 ] ドロップダウン メニューを使用して、このページの例のインターフェイスを設定します。


1

詳細については、 「 mongosh経由でクラスターに接続する 」を参照してください。

2
use sample_mflix
3
db.createView(
"moviesWithEmbeddings",
"embedded_movies",
[
{
"$match": {
"$expr": {
"$ne": [
{
"$type": "$plot_embedding_voyage_3_large"
},
"missing"
]
}
}
}
]
)
4

警告: ナビゲーションの改善が進行中次の手順が Atlas UIのビューと一致しない場合は、プレビュー ドキュメントを参照してください。

  1. まだ表示されていない場合は、希望するプロジェクトを含む組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. まだ表示されていない場合は、サイドバーの [Clusters] をクリックします。

    [ Clusters (クラスター) ] ページが表示されます。

5

GoAtlas Searchページには、サイドバー、Data Explorer 、またはクラスターの詳細ページから できます。

  1. サイドバーで、 Services見出しの下のAtlas Searchをクリックします。

    クラスターがない場合は、Create clusterをクリックしてクラスターを作成してください。詳細については、「 クラスターの作成 」を参照してください。

  2. プロジェクトに複数のクラスターがある場合は、Select cluster ドロップダウンから使用するクラスターを選択し、[Go to Atlas Search] をクリックします。

    Atlas Searchページが表示されます。

  1. クラスターの [Browse Collections] ボタンをクリックします。

  2. データベースを展開し、コレクションを選択します。

  3. コレクションのSearch Indexesタブをクリックします。

    Atlas Searchページが表示されます。

  1. クラスタの名前をクリックします。

  2. [Atlas Search] タブをクリックします。

    Atlas Searchページが表示されます。

6
7

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

Search Type

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

Index Name and Data Source

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

  • Index Name: embeddingsIndex

  • Database and Collection:

    • sample_mflix

    • moviesWithEmbeddings

Configuration Method

For a guided experience, select Visual Editor.

To edit the raw index definition, select JSON Editor.

注意

Atlas Search インデックスのデフォルト名は「default」です。この名前を変更しない場合、Atlas Search クエリのデフォルトの検索インデックスが使用され、その演算子では別の index オプションは指定されません。複数のインデックスを作成する場合は、インデックス全体で一貫性があり、内容がわかる命名規則を維持することをお勧めします。

8
  1. 次のインデックス定義を指定します。

    {
    "fields": [
    {
    "type": "vector",
    "numDimensions": 2048,
    "path": "plot_embedding_voyage_3_large",
    "similarity": "cosine"
    }
    ]
    }
  2. [Next] をクリックします。

9

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

10
11

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

注意

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

12

注意

次の例では、embeddingsIndex インデックスに対して .aggregate コマンドを実行し、moviesWithEmbeddings という名前のビューを検索します。クラスターが MongoDB v8.0 を実行している場合、ビューのインデックスを使用して、ソースコレクション(例: embedded_movies)をクエリする必要があります。ビューを直接クエリするために、MongoDB v8.1 以降にアップグレードしてください。

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

    TIME_TRAVEL_EMBEDDING=[-0.034731735,0.008558298,-0.0153717,-0.029912498,0.011549547,0.010261648,-0.011964999,-0.023265276,0.010303194,-0.006896493,-0.00054528,0.003926015,-0.025757983,0.027419789,0.001199616,-0.036227357,-0.005297005,0.021935832,0.010303194,-0.019193852,0.025093261,-0.040049512,-0.033900831,-0.011466458,-0.01827986,-0.0153717,0.023265276,0.007727395,0.000114249,0.005317777,-0.043871664,-0.02127111,-0.019609304,0.016368784,-0.004756918,0.003552109,0.006522586,-0.005400868,-0.015620971,-0.034565553,-0.018695312,-0.023099095,0.050851244,-0.034731735,0.004819236,0.022268193,-0.095719993,0.05517194,-0.046198189,-0.036393538,0.007187308,-0.02459472,-0.036725901,0.009472291,0.019027673,0.020938748,-0.011051006,0.027087428,0.04586583,-0.022600554,-0.05517194,0.044204023,0.01213118,0.047859997,-0.03938479,0.002928932,0.002056484,0.019443123,-0.028583053,0.013543714,0.022932915,0.011632638,0.004923099,0.000389486,0.020024756,-0.024096178,-0.022766734,0.011217186,-0.003198975,0.007104218,-0.047195274,-0.013377533,0.013294443,0.024096178,-0.056501385,-0.026755067,-0.008433662,-0.001911076,0.007976666,-0.008101301,-0.014042255,0.008641388,-0.02176965,0.010012378,-0.000607598,-0.024927082,0.024927082,-0.018612221,-0.001184036,0.005567048,0.001324251,-0.019526213,-0.023597637,0.060489718,-0.010178559,-0.019609304,0.004112968,-0.011217186,-0.031574301,-0.008766023,0.005483958,-0.061819162,-0.023431456,-0.040714234,0.015039339,0.026422706,0.016202603,0.004653055,0.041046593,-0.018030589,0.040381871,-0.002638116,0.013045172,0.004216831,0.005650138,0.027419789,0.003926015,-0.028749233,0.004798463,-0.030244859,0.063813329,0.007145763,-0.017448956,0.025591804,-0.045201108,0.010718645,0.002804297,0.014291527,0.04586583,-0.015205519,-0.021603471,-0.035230275,0.00760276,0.033236109,0.016534964,-0.043206941,-0.003115885,-0.026256526,0.005940954,0.016534964,0.024262359,-0.001630647,0.028084511,-0.012795902,0.007270399,0.001381376,-0.009763107,-0.006896493,0.008433662,-0.019360034,0.000386889,0.030411039,0.025591804,0.010469374,0.037722982,-0.001147684,-0.005400868,0.052845411,-0.052513052,0.00768585,-0.004299921,0.00922302,0.011881908,0.012962082,-0.068798743,0.003593654,0.020938748,-0.013792985,-0.034565553,-0.007519669,-0.04021569,-0.020689478,0.006273315,0.046862911,0.006107135,0.002638116,-0.013792985,-0.005400868,-0.020274026,0.007644305,-0.010801735,0.026422706,0.043871664,0.003780607,0.010261648,-0.064145692,0.011881908,-0.009056839,0.009347656,-0.02459472,0.026422706,0.033236109,0.041212775,0.019027673,-0.00315743,0.004424557,0.020689478,-0.0153717,-0.015205519,-0.034897912,0.020274026,0.016867325,0.040714234,-0.022766734,-0.010967916,0.026256526,0.007062673,-0.015953332,-0.007727395,0.031574301,-0.002887387,-0.00614868,0.004569965,0.019027673,0.012878992,0.011798819,0.004258377,-0.019193852,-0.021437289,-0.021603471,0.000301202,-0.051183607,-0.004985416,-0.030078677,0.012629721,0.065142773,-0.031740483,-0.021104928,-0.03938479,-0.003365156,-0.016036423,0.036393538,0.009804652,-0.018612221,0.060489718,-0.003697517,0.000547876,0.063480966,0.02758597,0.010053922,-0.003655972,-0.001485239,0.018362951,0.021104928,-0.003905243,0.019443123,-0.002658889,-0.00380138,-0.013626805,0.035894997,0.035396457,-0.005691683,0.002762751,0.012878992,-0.009596926,-0.009970833,-0.015953332,0.022434372,0.00614868,-0.021188019,0.001557943,-0.020190936,0.009763107,0.017448956,0.006730312,0.005567048,0.019692395,-0.00218112,-0.016867325,0.006854947,0.007976666,0.019193852,0.040880412,0.007353489,-0.02127111,-0.031906664,-0.026755067,-0.017947499,0.040381871,0.042209856,0.00913993,-0.0307434,-0.017781317,-0.015039339,0.03057722,0.017532047,0.0187784,-0.060822077,0.002928932,-0.026422706,-0.005899409,0.039717149,0.026588887,-0.000971118,0.004923099,-0.013626805,0.0187784,-0.031408124,-0.000695881,0.050851244,-0.014457707,-0.007311944,-0.001293092,-0.002139574,-0.019276943,0.00290816,0.019360034,-0.017781317,0.002160347,0.016618054,-0.006522586,0.011798819,0.029247776,-0.02775215,0.010344739,-0.018362951,-0.036725901,-0.015870241,0.015704062,-0.012463541,0.02459472,-0.024096178,0.001152877,-0.031408124,0.025425622,0.027087428,0.00922302,0.034565553,0.015704062,-0.020689478,-0.00517237,-0.014706978,-0.001589101,0.026090344,0.014956249,0.011715728,0.004299921,-0.00913993,0.022434372,-0.03705826,0.048524719,-0.030411039,0.008433662,0.017033506,-0.000511525,-0.031408124,0.005940954,-0.012962082,-0.031574301,0.017448956,0.010178559,-0.011383367,-0.020107845,-0.005151597,0.006647222,0.013128263,0.007145763,0.008059756,-0.045201108,-0.004943871,0.015787151,-0.045201108,-0.020772567,-0.020274026,0.028250692,-0.024262359,-0.004424557,0.009804652,0.000472576,-0.005691683,0.001443693,-0.013294443,0.001412535,0.013211353,-0.01213118,-0.002118802,0.017781317,-0.007353489,-0.031075761,-0.004923099,0.011383367,-0.004486875,-0.010178559,0.016618054,0.014457707,0.023763817,-0.02459472,-0.00388447,0.012546631,-0.007519669,0.015704062,-0.014291527,0.009680017,-0.035562634,0.023763817,0.053510133,-0.0555043,-0.003572882,0.022102011,0.021603471,-0.017282777,-0.001474852,-0.043539301,0.007810486,-0.025757983,-0.005400868,0.029912498,-0.00760276,0.014125346,0.030909581,-0.03340229,-0.009680017,0.018030589,0.008849114,0.03057722,0.019775484,0.014125346,0.031906664,-0.03057722,-0.027087428,-0.023597637,-0.022434372,-0.012878992,0.016285693,-0.021603471,-0.029746316,0.029746316,0.020357117,0.006314861,-0.001158071,0.028749233,-0.045201108,0.011383367,0.011134096,-0.021437289,-0.035728816,0.001827986,0.008267482,-0.057498466,0.01213118,-0.01213118,-0.040548053,0.010718645,0.004798463,-0.004881553,-0.019526213,-0.008558298,0.0059825,-0.000262254,-0.017615138,0.005193142,0.019692395,-0.00198378,-0.002845842,0.012546631,0.006107135,-0.008225936,-0.008890659,0.015870241,0.00517237,0.002596571,-0.010427829,-0.019110762,0.024262359,0.012048089,-0.032405205,0.006522586,0.013211353,0.013211353,-0.038221523,-0.007727395,-0.008267482,-0.019276943,0.001474852,0.031408124,-0.035562634,0.017532047,-0.023431456,-0.015454791,-0.011383367,0.016534964,-0.02176965,0.008682934,0.027253609,0.020190936,-0.0247609,-0.007311944,0.009555381,-0.01852913,-0.011632638,0.011549547,0.027419789,-0.034067012,-0.01229736,0.0307434,0.003946788,0.0046946,0.037722982,0.03057722,-0.010427829,0.002284982,0.033236109,0.030078677,-0.013377533,0.007395034,-0.012048089,0.040714234,-0.028749233,-0.000102565,-0.0059825,-0.041046593,0.017698228,-0.006356406,0.003178203,0.009056839,0.023099095,0.00606559,0.011881908,-0.02127111,-0.001126912,-0.027087428,0.011134096,0.001204809,-0.017033506,0.011051006,-0.014374617,0.017864408,0.023431456,-0.002077257,-0.026755067,-0.043871664,0.025757983,-0.006190225,0.001152877,0.011798819,-0.024262359,0.006564131,-0.070128188,-0.004362239,0.012962082,-0.013626805,-0.001402148,-0.012214269,0.011217186,-0.015953332,0.015787151,0.011134096,0.027253609,0.024262359,-0.048192356,0.009970833,0.018944582,-0.00517237,0.021935832,0.02775215,0.003406701,-0.010884825,0.075113602,-0.015953332,0.007727395,0.026755067,-0.006190225,-0.012712811,0.013377533,0.005940954,-0.008309027,0.02459472,0.002316141,-0.022434372,-0.012712811,0.03057722,-0.015787151,0.026755067,-0.001069787,0.03988333,-0.003697517,0.039550968,-0.019027673,-0.0059825,-0.00031029,-0.012546631,-0.003614427,0.007478124,0.005525503,0.032571387,-0.011798819,-0.011466458,-0.00606559,-0.011798819,0.018446039,0.007976666,0.018944582,-0.02176965,0.026588887,-0.006273315,-0.012463541,-0.007395034,0.012048089,-0.029247776,0.015454791,-0.007145763,0.006481041,-0.015620971,-0.00388447,-0.025757983,-0.001651419,-0.032903746,-0.005068507,0.03938479,0.003926015,0.004715373,0.022600554,-0.012546631,0.022932915,0.007810486,0.040714234,0.019941665,0.013543714,0.003406701,0.010884825,-0.03988333,0.042209856,-0.022766734,0.027419789,-0.029580137,0.043206941,0.022932915,0.021104928,-0.056833744,0.005193142,0.036061179,-0.012878992,0.008516753,-0.02758597,-0.030244859,-0.011798819,0.001111332,-0.014125346,-0.014125346,0.019027673,0.029081594,0.018861491,0.013626805,0.06846638,0.023099095,0.041378956,0.001599488,-0.028749233,0.017781317,0.016285693,0.021603471,-0.018113678,0.011300277,-0.032239024,0.022434372,-0.02459472,-0.013626805,0.005483958,0.013460624,-0.031574301,-0.015620971,0.016451873,0.014790068,-0.008849114,0.011134096,0.00461151,0.015122429,0.036227357,0.00206687,0.000877641,0.022102011,-0.028250692,0.022600554,-0.026422706,0.004029878,-0.032072846,0.017116595,0.010884825,0.019609304,0.00614868,0.005733229,0.016119512,0.002866614,-0.014540797,0.012463541,-0.003905243,0.003759835,-0.000485559,-0.022766734,-0.016285693,0.037722982,0.009513836,0.001506011,0.011964999,0.004029878,0.019941665,-0.000965924,0.002129188,0.015205519,0.071125269,0.022932915,0.005940954,-0.00044661,0.010220103,-0.03423319,-0.016285693,-0.016867325,-0.000659529,-0.008018211,-0.011383367,0.000016634,0.004071423,-0.029413955,0.019941665,-0.00913993,-0.024096178,0.010635555,0.010594009,0.001547556,0.036227357,-0.030078677,0.020772567,0.022268193,-0.014125346,0.008766023,-0.012962082,-0.007187308,0.017033506,-0.007187308,-0.015205519,-0.005608593,0.044536386,-0.001235968,0.007852031,0.001599488,0.005857864,-0.005940954,-0.010510919,-0.005567048,0.006730312,0.016285693,-0.010801735,-0.024428539,0.015122429,-0.02176965,0.01528861,-0.007436579,0.00226421,-0.004715373,0.004507647,0.004341467,0.005525503,-0.031075761,-0.005899409,0.037556801,0.014873158,-0.000342747,0.009970833,-0.019443123,0.023597637,-0.012048089,-0.025259443,0.006024044,-0.01827986,0.010012378,0.016784234,0.013211353,-0.005400868,-0.024428539,-0.02176965,-0.035230275,0.009347656,0.028583053,-0.015704062,-0.017781317,0.00226421,0.001199616,-0.003385928,0.008267482,0.002326528,0.022434372,-0.020190936,-0.015787151,0.000789358,0.031241942,0.011300277,0.001506011,-0.023265276,-0.010967916,0.009056839,0.011300277,-0.030244859,0.007478124,0.001111332,-0.035894997,0.0153717,0.002700434,0.021104928,0.010884825,-0.003344383,0.00768585,0.010386284,0.00452842,-0.014706978,0.028084511,0.013377533,0.014873158,0.046862911,-0.015454791,0.021188019,0.013959166,0.012629721,0.025924165,-0.018695312,-0.00922302,-0.0093892,0.007727395,0.036892079,0.007228854,-0.01229736,0.029247776,-0.004943871,-0.027253609,-0.008433662,0.043206941,0.002825069,0.028583053,-0.023431456,0.034897912,-0.041545134,-0.016534964,0.003053567,-0.012712811,0.002741979,-0.007187308,-0.025093261,-0.045201108,-0.004424557,-0.016618054,-0.008890659,0.008018211,-0.05184833,-0.019526213,-0.013377533,-0.010469374,0.030244859,-0.005068507,0.051183607,0.005483958,-0.006024044,0.035064094,-0.011134096,0.014956249,0.002284982,0.001724123,-0.01229736,0.012629721,0.010261648,0.014540797,0.048857078,-0.029580137,-0.024927082,-0.008350573,-0.03988333,0.000939959,0.013543714,0.013626805,-0.021437289,-0.012962082,0.006771857,0.013709894,-0.0059825,0.035396457,-0.006439496,-0.029580137,0.0046946,0.019609304,-0.007270399,0.014291527,-0.015620971,0.00118923,-0.00760276,-0.017199686,0.023265276,0.026588887,-0.030078677,-0.016701145,-0.025757983,0.004964644,0.026588887,0.043206941,0.011051006,-0.009846197,0.028915415,0.031574301,0.023763817,0.009264565,-0.008433662,-0.035064094,-0.000579035,-0.0247609,0.014125346,0.016618054,0.028749233,-0.052513052,-0.016867325,-0.01238045,0.002741979,0.013709894,0.010718645,0.013626805,0.009596926,-0.004403784,-0.02758597,-0.000945152,0.000420645,0.003759835,0.012546631,-0.011881908,0.008392117,0.012795902,0.005483958,-0.009763107,0.006397951,-0.010801735,0.012795902,-0.03938479,0.005733229,0.005733229,-0.000433627,0.015454791,0.002357686,-0.006564131,0.030244859,-0.024428539,0.016036423,0.014291527,-0.004964644,0.029413955,0.040381871,0.012629721,-0.033568468,-0.026422706,-0.037889164,-0.034399372,-0.03423319,0.021935832,0.004133741,-0.014623888,-0.013543714,-0.05517194,0.004736145,0.006314861,0.00006037,0.006356406,0.003323611,-0.010344739,0.007062673,0.005899409,-0.00623177,-0.001973394,-0.0555043,0.011881908,0.001350217,-0.033069927,-0.026921248,0.022268193,0.028583053,-0.021021837,0.010884825,0.019692395,-0.005442413,0.031574301,-0.014956249,0.01238045,-0.006356406,0.006273315,-0.003095113,-0.014540797,-0.02176965,0.005006189,-0.002658889,0.042542219,-0.02176965,0.017199686,-0.016701145,-0.001599488,0.016950415,-0.021188019,0.017864408,0.023763817,-0.000669915,0.025093261,0.021104928,0.008807569,0.037390623,-0.025591804,-0.003178203,-0.001319058,0.020523297,0.005255459,0.019276943,-0.00226421,0.00760276,-0.057166107,-0.006896493,-0.034067012,0.043871664,0.038221523,0.008101301,0.03988333,0.015870241,0.000955538,-0.004299921,-0.002928932,-0.002118802,-0.020523297,-0.001168457,-0.011134096,-0.000685495,0.003323611,0.011549547,0.034565553,0.029247776,-0.029746316,0.005213914,0.019110762,-0.003302838,0.026422706,0.028915415,-0.036227357,0.033236109,0.038387705,-0.035230275,0.004071423,-0.021935832,0.002928932,0.000976311,0.000527104,-0.006854947,-0.003822153,-0.001199616,0.019858574,-0.002762751,0.039052427,-0.008641388,0.032239024,-0.002295369,0.035396457,0.044536386,-0.029413955,0.025093261,-0.03423319,-0.016867325,-0.008849114,0.008433662,-0.004486875,0.017033506,0.006730312,-0.008599843,-0.008225936,-0.024428539,0.006564131,-0.007561215,-0.032072846,-0.019941665,0.035396457,0.019276943,0.010261648,0.005857864,0.032239024,-0.044204023,-0.018944582,0.002409618,0.032903746,0.05517194,-0.03655972,0.007976666,0.030909581,-0.023929998,0.016368784,0.01528861,-0.00768585,0.02176965,0.013626805,-0.02459472,0.04021569,-0.032737568,0.006854947,-0.011383367,0.014873158,-0.02176965,0.00243039,0.0093892,0.0093892,-0.029580137,0.019858574,0.01827986,0.024428539,0.017864408,-0.028250692,-0.001111332,0.056169022,0.007478124,-0.010718645,0.041046593,-0.015704062,0.034731735,0.002523867,-0.032571387,0.004341467,-0.023597637,-0.011881908,-0.035562634,0.006688767,0.007810486,-0.012712811,0.022600554,0.03057722,0.022600554,0.010552464,0.0307434,-0.009638472,0.02176965,-0.018030589,0.024262359,-0.036227357,-0.020772567,0.001641033,-0.022932915,-0.014623888,0.018362951,0.002575798,0.006190225,-0.011051006,0.021021837,0.019110762,0.02127111,-0.028583053,-0.052180689,-0.014291527,-0.010552464,0.036393538,0.042542219,-0.04586583,-0.001869531,0.008350573,-0.008516753,-0.020772567,0.000294711,0.015704062,-0.014457707,-0.020772567,0.008766023,-0.026588887,-0.004736145,-0.028084511,-0.007519669,0.010552464,-0.016534964,0.006190225,0.012962082,-0.016618054,0.012546631,0.02459472,0.022932915,0.020440206,-0.027918331,-0.008059756,0.020689478,-0.014623888,-0.011466458,-0.006896493,-0.020024756,-0.031408124,0.021603471,0.007270399,-0.03057722,0.008350573,-0.021437289,0.00072704,-0.043871664,0.006314861,-0.017199686,0.02176965,0.024262359,-0.020357117,-0.000542683,-0.005213914,0.001963008,-0.00064395,-0.022434372,0.022102011,-0.006688767,-0.028583053,0.002191506,-0.005047734,0.002368073,0.014956249,0.023929998,-0.003302838,-0.032239024,0.022268193,-0.013377533,-0.010801735,0.003676744,0.009015295,-0.039550968,0.010884825,-0.033568468,0.013709894,-0.029413955,-0.006356406,-0.020274026,0.023597637,0.030909581,0.02176965,0.016285693,0.045533467,-0.024096178,-0.030909581,-0.026422706,0.002783524,-0.010594009,0.004362239,-0.070792913,0.009472291,-0.022102011,0.011134096,-0.017448956,-0.011549547,-0.056833744,0.00082571,0.026588887,-0.013709894,0.002575798,0.02176965,-0.000568649,-0.007270399,0.004279149,-0.042874578,-0.026588887,0.016784234,0.036725901,-0.028915415,-0.009513836,0.017448956,0.002035712,-0.007228854,0.011383367,0.011134096,0.028915415,0.0153717,-0.027087428,0.043871664,-0.005089279,0.006314861,0.014291527,-0.003240521,0.025924165,-0.001230775,-0.015454791,-0.012629721,0.031740483,-0.039717149,-0.031075761,0.006605676,-0.008641388,-0.032239024,0.037722982,-0.03705826,-0.024096178,0.001911076,0.018196769,-0.007353489,-0.011300277,-0.029081594,0.004590738,-0.018030589,-0.026588887,0.010261648,0.038221523,0.008392117,-0.01213118,0.018362951,-0.034731735,-0.017781317,-0.011632638,0.005255459,0.000851675,0.014208436,-0.000039922,-0.000228498,0.014790068,0.00913993,0.0004544,-0.011798819,-0.020440206,0.005899409,0.008350573,0.006314861,0.040548053,0.003427474,-0.010801735,0.008599843,0.002586185,-0.041212775,-0.016368784,0.020024756,0.000965924,-0.021021837,-0.008475208,0.0307434,0.00760276,0.003614427,0.003489791,-0.025924165,0.000799744,0.013460624,-0.020440206,0.048857078,0.004320694,-0.048857078,0.015039339,-0.029580137,0.025924165,0.018861491,-0.014706978,0.000576439,-0.031241942,0.0307434,0.0153717,0.014706978,0.028084511,-0.01238045,-0.031241942,0.018196769,-0.034897912,0.008142847,0.010718645,0.00922302,0.047859997,-0.00072704,-0.010427829,0.007104218,0.026256526,0.012214269,-0.013377533,-0.05184833,0.005276232,0.021935832,-0.007021128,0.009804652,0.007893575,0.024096178,-0.002357686,0.033900831,-0.031740483,0.034565553,-0.036892079,-0.015454791,0.030411039,0.010552464,-0.022268193,-0.001391762,-0.008184392,-0.008558298,0.008475208,-0.009929287,0.010427829,0.041378956,-0.009555381,-0.008724478,-0.039052427,0.034731735,-0.014291527,0.023099095,0.029081594,0.007519669,0.010967916,-0.008142847,0.006190225,-0.031075761,0.033734649,-0.001672192,0.047859997,-0.022434372,-0.007395034,0.01213118,0.056169022,0.002762751,-0.029413955,-0.000763392,-0.015787151,0.010801735,0.008142847,0.029912498,-0.0018176,0.033236109,-0.046198189,-0.002492708,-0.006730312,0.008807569,-0.03655972,0.009430746,-0.053842496,-0.060489718,0.046862911,0.002783524,-0.0187784,0.000571246,0.00760276,0.002482322,0.001319058,-0.014291527,0.001464466,-0.011632638,-0.012463541,-0.004902326,0.000841289,0.006688767,0.030244859,0.018944582,0.000532297,-0.015620971,0.007104218,0.005608593,0.002035712,-0.023763817,0.003032795,0.010594009,-0.023597637,-0.042376038,-0.005255459,0.001199616,-0.0247609,-0.007893575,-0.011632638,0.013045172,-0.005691683,-0.007104218,0.027419789,-0.004320694,-0.005525503,-0.026090344,0.031408124,-0.012795902,-0.007062673,0.000939959,0.000030185,0.004175286,0.014291527,0.033236109,-0.038720068,0.074116521,-0.019692395,0.001589101,0.013792985,-0.056169022,-0.028749233,-0.001599488,0.004175286,0.014790068,0.00162026,-0.007519669,-0.041378956,0.016534964,-0.003572882,-0.002575798,-0.019526213,-0.00922302,-0.033900831,-0.042043675,-0.014208436,0.010178559,0.017698228,0.032239024,0.00913993,0.009264565,-0.012463541,-0.005857864,-0.015870241,0.004486875,0.018861491,-0.000176567,-0.029912498,0.016784234,0.012546631,0.051183607,0.023597637,0.032903746,0.0153717,-0.013377533,-0.000016634,-0.061486799,-0.034565553,0.016119512,0.00380138,-0.003863698,0.004362239,-0.017532047,-0.002762751,0.000102565,-0.021437289,0.029247776,-0.010718645,-0.015870241,-0.016285693,0.010220103,-0.000373906,0.012962082,0.010137013,-0.007228854,0.02127111,-0.029247776,0.018113678,0.009181475,0.002233051,0.014374617,-0.00396756,0.010801735,0.007644305,0.020855658,0.014790068,0.032737568,-0.037390623,0.003032795,0.010801735,-0.01553788,-0.014790068,0.019526213,-0.017947499,-0.007893575,-0.011964999,-0.00614868,-0.005857864,-0.032072846,-0.025924165,0.001163264,-0.013294443,-0.01553788,0.016701145,-0.013460624,-0.001111332,0.00760276,0.01553788,-0.033734649,0.048192356,-0.003282066,0.031906664,0.002845842,0.003240521,0.017116595,-0.01827986,0.006896493,-0.00760276,-0.009680017,-0.02459472,-0.020689478,-0.053510133,0.00614868,-0.010552464,-0.032405205,-0.0307434,0.025093261,0.003635199,-0.008101301,-0.00606559,-0.007436579,0.00606559,-0.012962082,0.026921248,0.009098385,0.046530552,-0.011632638,0.032571387,-0.033900831,0.009846197,0.002866614,0.032903746,0.008973749,0.012712811,0.040049512,0.013626805,-0.026256526,-0.031408124,0.036227357,0.011964999,-0.006024044,-0.001848759,0.015704062,-0.021188019,-0.035064094,-0.013377533,-0.009721561,-0.01553788,0.008766023,0.005400868,0.004507647,-0.018362951,-0.026588887,-0.00913993,-0.025591804,0.035894997,0.021935832,-0.031906664,-0.000602404,0.026422706,-0.006397951,0.006647222,0.0093892,0.020606387,0.00913993,0.015620971,-0.024096178,0.00063616,-0.006564131,0.01238045,-0.013709894,0.000563456,-0.009887742,0.016618054,-0.003323611,0.000451803,0.001609874,0.008682934,0.025259443,0.020024756,-0.027253609,0.010884825,0.028250692,-0.054839578,0.033568468,-0.004902326,0.003053567,0.020274026,-0.015704062,-0.00614868,-0.063813329,0.002482322,0.009763107,-0.001609874,-0.012214269,0.020107845,0.001921462,0.018695312,-0.004923099,0.007270399,-0.023763817,0.005234687,0.003406701,0.002565412,0.007104218,0.000841289,0.016202603,0.01827986,-0.031075761,-0.035562634,-0.025259443,-0.007021128,0.000641353,-0.033069927,0.010718645,0.005650138,0.024927082,-0.002658889,0.00380138,0.009929287,-0.004258377,-0.039717149,-0.022434372,0.025425622,0.00198378,0.006356406,0.017615138,-0.032072846,0.046862911,-0.026921248,0.005940954,0.021603471,-0.002253824,0.002825069,-0.030411039,-0.003115885,0.023597637,-0.004320694,-0.007852031,0.018030589,-0.008724478,-0.005733229,0.032903746,0.013876075,0.015454791,-0.023597637,0.005151597,-0.035396457,0.02176965,-0.012463541,0.025591804,0.014540797,-0.027918331,0.004154514,0.008724478,0.016036423,-0.015870241,0.005400868,-0.017365867,-0.044868745,-0.000485559,0.020357117,-0.00760276,-0.023265276,-0.012048089,0.008433662,0.018362951,-0.006979583,0.0307434,0.008392117,0.027087428,-0.019360034,0.016119512,0.02127111,0.010801735,0.00299125,0.002949705,0.012463541,-0.000025966,0.015953332,0.029413955,0.020024756,0.003780607,0.022102011,-0.031740483,0.01553788,0.010386284,0.028749233,-0.010884825,0.008682934,-0.003531337,-0.05517194,-0.019360034,-0.009347656,-0.002025325,0.003261293,-0.025425622,-0.01553788,-0.000251867,0.014291527,0.012546631,0.035728816,-0.007062673,-0.006605676,0.000384293,-0.005047734,-0.032571387,-0.021188019,-0.02127111,-0.016036423,0.008475208,-0.004009106,0.014291527,-0.008101301,0.004424557,-0.038221523,-0.019360034,0.015039339,-0.015454791,-0.029580137,0.035728816,0.004466102,-0.000778971,-0.005068507,-0.017781317,0.00477769,0.001838372,0.030244859,0.01213118,-0.022932915,-0.005359322,0.037390623,0.005899409,0.002046098,0.037889164,0.016701145,0.010303194,0.02127111,-0.009513836,-0.022268193,-0.005650138,-0.00388447,0.016534964,-0.023265276,-0.00054528,0.004819236,0.004715373,-0.001178843,-0.051183607,-0.00614868,-0.010552464,-0.002741979,-0.009181475,0.023597637,0.019193852,0.017199686,-0.036393538,-0.00243039,-0.015870241,-0.014706978,-0.00145408,0.016368784,-0.011632638,-0.014623888,-0.01229736,-0.01553788,0.040880412,0.023929998,-0.014623888,0.002648502,0.031906664,-0.033734649,-0.026755067,0.002783524,0.005359322,0.009970833,0.001412535,0.016950415,0.016285693,-0.006730312,-0.02459472,0.050851244,-0.001827986,-0.020855658,0.020938748,0.004071423,-0.021603471,-0.007852031,-0.023929998,-0.029912498,-0.003365156,0.017365867,-0.010427829,-0.011715728,0.014956249,0.011383367,0.032405205,-0.028583053,-0.017448956,0.018446039,0.017615138,0.035728816,-0.010095468,-0.00254464,0.010012378,0.028250692,-0.020855658,-0.002305755,-0.001002276,-0.014125346,-0.007021128,-0.028583053,-0.045533467,-0.02758597,-0.020440206,0.001350217,0.010053922,0.020689478,-0.017615138,0.026422706,0.040880412,0.012463541,-0.010718645,-0.014706978,0.068134025,0.038720068,0.047859997,-0.012546631,0.015704062,-0.002087643,-0.010303194,0.014790068,0.018612221,0.007395034,-0.014790068,-0.017864408,-0.005068507,-0.054507218,0.004902326,-0.004050651,0.021603471,0.019775484,-0.024262359,-0.012795902,0.021935832,-0.004009106,-0.039717149,0.037556801,-0.016701145,-0.025757983,0.005483958,-0.005110051,-0.021935832,-0.003406701,0.010594009,0.015787151,-0.049854163,0.007727395,-0.008392117,-0.017199686,0.009970833,-0.008849114,-0.013876075,-0.0059825,-0.015870241,-0.007104218,0.028250692,-0.029081594,0.026921248,0.00299125,-0.017781317,0.042542219,0.018196769,0.052845411,-0.004819236,-0.014125346,0.02459472,-0.011715728,0.015787151,-0.005774774,0.004902326,-0.004964644,-0.02758597,-0.013959166,-0.033568468,-0.027918331,-0.017698228,0.003489791,-0.020024756,-0.021603471,0.019360034,0.028084511,-0.002503094,-0.018861491,-0.002295369,0.050851244,-0.020689478,-0.000459593,-0.026090344,0.002783524,-0.005899409,-0.026921248,-0.0093892,-0.004112968,0.031574301,0.003926015,-0.032903746,-0.046198189,-0.019027673,-0.00913993,0.030411039,-0.019443123,0.001963008,-0.005193142,0.010884825,-0.02127111,-0.025259443,0.032737568,0.00089322,0.003282066,0.001713737,-0.006439496,0.016867325,-0.031574301,0.031075761,-0.009970833,0.022600554,-0.023597637,-0.014956249,0.004009106,0.00198378,0.026588887,-0.023431456,-0.023763817,-0.013294443,-0.029746316,0.001381376,-0.042874578,-0.00913993,0.014873158,0.016202603,0.012878992,-0.006024044,0.009638472,0.010552464,-0.017033506,-0.027087428,0.044536386,-0.038055345,0.001329444,-0.019609304,0.023597637,-0.043206941,0.040049512,0.017615138,0.046862911,0.02127111,0.013294443,-0.039550968,-0.018861491,-0.019609304,-0.033734649,0.00623177,-0.017199686,0.041212775,-0.017781317,-0.024262359,0.054507218,-0.009721561,0.005816319,-0.00206687,-0.008766023,0.017365867,-0.000737426,0.018362951,-0.023597637,-0.019110762,0.021935832,0.041545134,-0.020357117,-0.017615138,0.044868745,-0.018030589,-0.032405205,-0.050186522,-0.014540797,0.005213914,-0.006688767,0.047527634,0.040714234];

    このファイルには、クエリタームtime travel の埋め込みが含まれています。

  2. mongoshで、ファイルをmongosh にロードしてクエリで埋め込みを使用します。

    load('/<path-to-file>/query-embeddings.js');
  3. 次のクエリを実行します。

    1use sample_mflix
    2db.moviesWithEmbeddings.aggregate([
    3 {
    4 "$vectorSearch": {
    5 "index": "embeddingsIndex",
    6 "path": "plot_embedding_voyage_3_large",
    7 "queryVector": TIME_TRAVEL_EMBEDDING,
    8 "numCandidates": 100,
    9 "limit": 10
    10 }
    11 },
    12 {
    13 "$project": {
    14 "_id": 0,
    15 "plot": 1,
    16 "title": 1,
    17 }
    18 }
    19])
    [
    {
    plot: 'At the age of 21, Tim discovers he can travel in time and change what happens and has happened in his own life. His decision to make his world a better place by getting a girlfriend turns out not to be as easy as you might think.',
    title: 'About Time'
    },
    {
    plot: 'A psychiatrist makes multiple trips through time to save a woman that was murdered by her brutal husband.',
    title: 'Retroactive'
    },
    {
    plot: 'A time-travel experiment in which a robot probe is sent from the year 2073 to the year 1973 goes terribly wrong thrusting one of the project scientists, a man named Nicholas Sinclair into a...',
    title: 'A.P.E.X.'
    },
    {
    plot: 'An officer for a security agency that regulates time travel, must fend for his life against a shady politician who has a tie to his past.',
    title: 'Timecop'
    },
    {
    plot: 'After visiting 2015, Marty McFly must repeat his visit to 1955 to prevent disastrous changes to 1985... without interfering with his first trip.',
    title: 'Back to the Future Part II'
    },
    {
    plot: 'A reporter, learning of time travelers visiting 20th century disasters, tries to change the history they know by averting upcoming disasters.',
    title: 'Thrill Seekers'
    },
    {
    plot: 'Lyle, a motorcycle champion is traveling the Mexican desert, when he find himself in the action radius of a time machine. So he find himself one century back in the past between rapists, ...',
    title: 'Timerider: The Adventure of Lyle Swann'
    },
    {
    plot: 'Hoping to alter the events of the past, a 19th century inventor instead travels 800,000 years into the future, where he finds humankind divided into two warring races.',
    title: 'The Time Machine'
    },
    {
    plot: 'A romantic drama about a Chicago librarian with a gene that causes him to involuntarily time travel, and the complications it creates for his marriage.',
    title: "The Time Traveler's Wife"
    },
    {
    plot: 'A modern aircraft carrier is thrown back in time to 1941 near Hawaii, just hours before the Japanese attack on Pearl Harbor.',
    title: 'The Final Countdown'
    }
    ]
1

詳細については、 「 mongosh経由でクラスターに接続する 」を参照してください。

2
use sample_mflix
3
db.createView(
"moviesWithEmbeddings",
"embedded_movies",
[
{
"$match": {
"$expr": {
"$ne": [
{
"$type": "$plot_embedding_voyage_3_large"
},
"missing"
]
}
}
}
]
)
4
db.moviesWithEmbeddings.createSearchIndex(
"embeddingsIndex",
"vectorSearch",
{
"fields": [
{
"type": "vector",
"numDimensions": 2048,
"path": "plot_embedding_voyage_3_large",
"similarity": "cosine"
}
]
}
)
5

注意

次の例では、embeddingsIndex インデックスに対して .aggregate コマンドを実行し、moviesWithEmbeddings という名前のビューを検索します。クラスターが MongoDB v8.0 を実行している場合、ビューのインデックスを使用して、ソースコレクション(例: embedded_movies)をクエリする必要があります。ビューを直接クエリするために、MongoDB v8.1 以降にアップグレードしてください。

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

    TIME_TRAVEL_EMBEDDING=[-0.034731735,0.008558298,-0.0153717,-0.029912498,0.011549547,0.010261648,-0.011964999,-0.023265276,0.010303194,-0.006896493,-0.00054528,0.003926015,-0.025757983,0.027419789,0.001199616,-0.036227357,-0.005297005,0.021935832,0.010303194,-0.019193852,0.025093261,-0.040049512,-0.033900831,-0.011466458,-0.01827986,-0.0153717,0.023265276,0.007727395,0.000114249,0.005317777,-0.043871664,-0.02127111,-0.019609304,0.016368784,-0.004756918,0.003552109,0.006522586,-0.005400868,-0.015620971,-0.034565553,-0.018695312,-0.023099095,0.050851244,-0.034731735,0.004819236,0.022268193,-0.095719993,0.05517194,-0.046198189,-0.036393538,0.007187308,-0.02459472,-0.036725901,0.009472291,0.019027673,0.020938748,-0.011051006,0.027087428,0.04586583,-0.022600554,-0.05517194,0.044204023,0.01213118,0.047859997,-0.03938479,0.002928932,0.002056484,0.019443123,-0.028583053,0.013543714,0.022932915,0.011632638,0.004923099,0.000389486,0.020024756,-0.024096178,-0.022766734,0.011217186,-0.003198975,0.007104218,-0.047195274,-0.013377533,0.013294443,0.024096178,-0.056501385,-0.026755067,-0.008433662,-0.001911076,0.007976666,-0.008101301,-0.014042255,0.008641388,-0.02176965,0.010012378,-0.000607598,-0.024927082,0.024927082,-0.018612221,-0.001184036,0.005567048,0.001324251,-0.019526213,-0.023597637,0.060489718,-0.010178559,-0.019609304,0.004112968,-0.011217186,-0.031574301,-0.008766023,0.005483958,-0.061819162,-0.023431456,-0.040714234,0.015039339,0.026422706,0.016202603,0.004653055,0.041046593,-0.018030589,0.040381871,-0.002638116,0.013045172,0.004216831,0.005650138,0.027419789,0.003926015,-0.028749233,0.004798463,-0.030244859,0.063813329,0.007145763,-0.017448956,0.025591804,-0.045201108,0.010718645,0.002804297,0.014291527,0.04586583,-0.015205519,-0.021603471,-0.035230275,0.00760276,0.033236109,0.016534964,-0.043206941,-0.003115885,-0.026256526,0.005940954,0.016534964,0.024262359,-0.001630647,0.028084511,-0.012795902,0.007270399,0.001381376,-0.009763107,-0.006896493,0.008433662,-0.019360034,0.000386889,0.030411039,0.025591804,0.010469374,0.037722982,-0.001147684,-0.005400868,0.052845411,-0.052513052,0.00768585,-0.004299921,0.00922302,0.011881908,0.012962082,-0.068798743,0.003593654,0.020938748,-0.013792985,-0.034565553,-0.007519669,-0.04021569,-0.020689478,0.006273315,0.046862911,0.006107135,0.002638116,-0.013792985,-0.005400868,-0.020274026,0.007644305,-0.010801735,0.026422706,0.043871664,0.003780607,0.010261648,-0.064145692,0.011881908,-0.009056839,0.009347656,-0.02459472,0.026422706,0.033236109,0.041212775,0.019027673,-0.00315743,0.004424557,0.020689478,-0.0153717,-0.015205519,-0.034897912,0.020274026,0.016867325,0.040714234,-0.022766734,-0.010967916,0.026256526,0.007062673,-0.015953332,-0.007727395,0.031574301,-0.002887387,-0.00614868,0.004569965,0.019027673,0.012878992,0.011798819,0.004258377,-0.019193852,-0.021437289,-0.021603471,0.000301202,-0.051183607,-0.004985416,-0.030078677,0.012629721,0.065142773,-0.031740483,-0.021104928,-0.03938479,-0.003365156,-0.016036423,0.036393538,0.009804652,-0.018612221,0.060489718,-0.003697517,0.000547876,0.063480966,0.02758597,0.010053922,-0.003655972,-0.001485239,0.018362951,0.021104928,-0.003905243,0.019443123,-0.002658889,-0.00380138,-0.013626805,0.035894997,0.035396457,-0.005691683,0.002762751,0.012878992,-0.009596926,-0.009970833,-0.015953332,0.022434372,0.00614868,-0.021188019,0.001557943,-0.020190936,0.009763107,0.017448956,0.006730312,0.005567048,0.019692395,-0.00218112,-0.016867325,0.006854947,0.007976666,0.019193852,0.040880412,0.007353489,-0.02127111,-0.031906664,-0.026755067,-0.017947499,0.040381871,0.042209856,0.00913993,-0.0307434,-0.017781317,-0.015039339,0.03057722,0.017532047,0.0187784,-0.060822077,0.002928932,-0.026422706,-0.005899409,0.039717149,0.026588887,-0.000971118,0.004923099,-0.013626805,0.0187784,-0.031408124,-0.000695881,0.050851244,-0.014457707,-0.007311944,-0.001293092,-0.002139574,-0.019276943,0.00290816,0.019360034,-0.017781317,0.002160347,0.016618054,-0.006522586,0.011798819,0.029247776,-0.02775215,0.010344739,-0.018362951,-0.036725901,-0.015870241,0.015704062,-0.012463541,0.02459472,-0.024096178,0.001152877,-0.031408124,0.025425622,0.027087428,0.00922302,0.034565553,0.015704062,-0.020689478,-0.00517237,-0.014706978,-0.001589101,0.026090344,0.014956249,0.011715728,0.004299921,-0.00913993,0.022434372,-0.03705826,0.048524719,-0.030411039,0.008433662,0.017033506,-0.000511525,-0.031408124,0.005940954,-0.012962082,-0.031574301,0.017448956,0.010178559,-0.011383367,-0.020107845,-0.005151597,0.006647222,0.013128263,0.007145763,0.008059756,-0.045201108,-0.004943871,0.015787151,-0.045201108,-0.020772567,-0.020274026,0.028250692,-0.024262359,-0.004424557,0.009804652,0.000472576,-0.005691683,0.001443693,-0.013294443,0.001412535,0.013211353,-0.01213118,-0.002118802,0.017781317,-0.007353489,-0.031075761,-0.004923099,0.011383367,-0.004486875,-0.010178559,0.016618054,0.014457707,0.023763817,-0.02459472,-0.00388447,0.012546631,-0.007519669,0.015704062,-0.014291527,0.009680017,-0.035562634,0.023763817,0.053510133,-0.0555043,-0.003572882,0.022102011,0.021603471,-0.017282777,-0.001474852,-0.043539301,0.007810486,-0.025757983,-0.005400868,0.029912498,-0.00760276,0.014125346,0.030909581,-0.03340229,-0.009680017,0.018030589,0.008849114,0.03057722,0.019775484,0.014125346,0.031906664,-0.03057722,-0.027087428,-0.023597637,-0.022434372,-0.012878992,0.016285693,-0.021603471,-0.029746316,0.029746316,0.020357117,0.006314861,-0.001158071,0.028749233,-0.045201108,0.011383367,0.011134096,-0.021437289,-0.035728816,0.001827986,0.008267482,-0.057498466,0.01213118,-0.01213118,-0.040548053,0.010718645,0.004798463,-0.004881553,-0.019526213,-0.008558298,0.0059825,-0.000262254,-0.017615138,0.005193142,0.019692395,-0.00198378,-0.002845842,0.012546631,0.006107135,-0.008225936,-0.008890659,0.015870241,0.00517237,0.002596571,-0.010427829,-0.019110762,0.024262359,0.012048089,-0.032405205,0.006522586,0.013211353,0.013211353,-0.038221523,-0.007727395,-0.008267482,-0.019276943,0.001474852,0.031408124,-0.035562634,0.017532047,-0.023431456,-0.015454791,-0.011383367,0.016534964,-0.02176965,0.008682934,0.027253609,0.020190936,-0.0247609,-0.007311944,0.009555381,-0.01852913,-0.011632638,0.011549547,0.027419789,-0.034067012,-0.01229736,0.0307434,0.003946788,0.0046946,0.037722982,0.03057722,-0.010427829,0.002284982,0.033236109,0.030078677,-0.013377533,0.007395034,-0.012048089,0.040714234,-0.028749233,-0.000102565,-0.0059825,-0.041046593,0.017698228,-0.006356406,0.003178203,0.009056839,0.023099095,0.00606559,0.011881908,-0.02127111,-0.001126912,-0.027087428,0.011134096,0.001204809,-0.017033506,0.011051006,-0.014374617,0.017864408,0.023431456,-0.002077257,-0.026755067,-0.043871664,0.025757983,-0.006190225,0.001152877,0.011798819,-0.024262359,0.006564131,-0.070128188,-0.004362239,0.012962082,-0.013626805,-0.001402148,-0.012214269,0.011217186,-0.015953332,0.015787151,0.011134096,0.027253609,0.024262359,-0.048192356,0.009970833,0.018944582,-0.00517237,0.021935832,0.02775215,0.003406701,-0.010884825,0.075113602,-0.015953332,0.007727395,0.026755067,-0.006190225,-0.012712811,0.013377533,0.005940954,-0.008309027,0.02459472,0.002316141,-0.022434372,-0.012712811,0.03057722,-0.015787151,0.026755067,-0.001069787,0.03988333,-0.003697517,0.039550968,-0.019027673,-0.0059825,-0.00031029,-0.012546631,-0.003614427,0.007478124,0.005525503,0.032571387,-0.011798819,-0.011466458,-0.00606559,-0.011798819,0.018446039,0.007976666,0.018944582,-0.02176965,0.026588887,-0.006273315,-0.012463541,-0.007395034,0.012048089,-0.029247776,0.015454791,-0.007145763,0.006481041,-0.015620971,-0.00388447,-0.025757983,-0.001651419,-0.032903746,-0.005068507,0.03938479,0.003926015,0.004715373,0.022600554,-0.012546631,0.022932915,0.007810486,0.040714234,0.019941665,0.013543714,0.003406701,0.010884825,-0.03988333,0.042209856,-0.022766734,0.027419789,-0.029580137,0.043206941,0.022932915,0.021104928,-0.056833744,0.005193142,0.036061179,-0.012878992,0.008516753,-0.02758597,-0.030244859,-0.011798819,0.001111332,-0.014125346,-0.014125346,0.019027673,0.029081594,0.018861491,0.013626805,0.06846638,0.023099095,0.041378956,0.001599488,-0.028749233,0.017781317,0.016285693,0.021603471,-0.018113678,0.011300277,-0.032239024,0.022434372,-0.02459472,-0.013626805,0.005483958,0.013460624,-0.031574301,-0.015620971,0.016451873,0.014790068,-0.008849114,0.011134096,0.00461151,0.015122429,0.036227357,0.00206687,0.000877641,0.022102011,-0.028250692,0.022600554,-0.026422706,0.004029878,-0.032072846,0.017116595,0.010884825,0.019609304,0.00614868,0.005733229,0.016119512,0.002866614,-0.014540797,0.012463541,-0.003905243,0.003759835,-0.000485559,-0.022766734,-0.016285693,0.037722982,0.009513836,0.001506011,0.011964999,0.004029878,0.019941665,-0.000965924,0.002129188,0.015205519,0.071125269,0.022932915,0.005940954,-0.00044661,0.010220103,-0.03423319,-0.016285693,-0.016867325,-0.000659529,-0.008018211,-0.011383367,0.000016634,0.004071423,-0.029413955,0.019941665,-0.00913993,-0.024096178,0.010635555,0.010594009,0.001547556,0.036227357,-0.030078677,0.020772567,0.022268193,-0.014125346,0.008766023,-0.012962082,-0.007187308,0.017033506,-0.007187308,-0.015205519,-0.005608593,0.044536386,-0.001235968,0.007852031,0.001599488,0.005857864,-0.005940954,-0.010510919,-0.005567048,0.006730312,0.016285693,-0.010801735,-0.024428539,0.015122429,-0.02176965,0.01528861,-0.007436579,0.00226421,-0.004715373,0.004507647,0.004341467,0.005525503,-0.031075761,-0.005899409,0.037556801,0.014873158,-0.000342747,0.009970833,-0.019443123,0.023597637,-0.012048089,-0.025259443,0.006024044,-0.01827986,0.010012378,0.016784234,0.013211353,-0.005400868,-0.024428539,-0.02176965,-0.035230275,0.009347656,0.028583053,-0.015704062,-0.017781317,0.00226421,0.001199616,-0.003385928,0.008267482,0.002326528,0.022434372,-0.020190936,-0.015787151,0.000789358,0.031241942,0.011300277,0.001506011,-0.023265276,-0.010967916,0.009056839,0.011300277,-0.030244859,0.007478124,0.001111332,-0.035894997,0.0153717,0.002700434,0.021104928,0.010884825,-0.003344383,0.00768585,0.010386284,0.00452842,-0.014706978,0.028084511,0.013377533,0.014873158,0.046862911,-0.015454791,0.021188019,0.013959166,0.012629721,0.025924165,-0.018695312,-0.00922302,-0.0093892,0.007727395,0.036892079,0.007228854,-0.01229736,0.029247776,-0.004943871,-0.027253609,-0.008433662,0.043206941,0.002825069,0.028583053,-0.023431456,0.034897912,-0.041545134,-0.016534964,0.003053567,-0.012712811,0.002741979,-0.007187308,-0.025093261,-0.045201108,-0.004424557,-0.016618054,-0.008890659,0.008018211,-0.05184833,-0.019526213,-0.013377533,-0.010469374,0.030244859,-0.005068507,0.051183607,0.005483958,-0.006024044,0.035064094,-0.011134096,0.014956249,0.002284982,0.001724123,-0.01229736,0.012629721,0.010261648,0.014540797,0.048857078,-0.029580137,-0.024927082,-0.008350573,-0.03988333,0.000939959,0.013543714,0.013626805,-0.021437289,-0.012962082,0.006771857,0.013709894,-0.0059825,0.035396457,-0.006439496,-0.029580137,0.0046946,0.019609304,-0.007270399,0.014291527,-0.015620971,0.00118923,-0.00760276,-0.017199686,0.023265276,0.026588887,-0.030078677,-0.016701145,-0.025757983,0.004964644,0.026588887,0.043206941,0.011051006,-0.009846197,0.028915415,0.031574301,0.023763817,0.009264565,-0.008433662,-0.035064094,-0.000579035,-0.0247609,0.014125346,0.016618054,0.028749233,-0.052513052,-0.016867325,-0.01238045,0.002741979,0.013709894,0.010718645,0.013626805,0.009596926,-0.004403784,-0.02758597,-0.000945152,0.000420645,0.003759835,0.012546631,-0.011881908,0.008392117,0.012795902,0.005483958,-0.009763107,0.006397951,-0.010801735,0.012795902,-0.03938479,0.005733229,0.005733229,-0.000433627,0.015454791,0.002357686,-0.006564131,0.030244859,-0.024428539,0.016036423,0.014291527,-0.004964644,0.029413955,0.040381871,0.012629721,-0.033568468,-0.026422706,-0.037889164,-0.034399372,-0.03423319,0.021935832,0.004133741,-0.014623888,-0.013543714,-0.05517194,0.004736145,0.006314861,0.00006037,0.006356406,0.003323611,-0.010344739,0.007062673,0.005899409,-0.00623177,-0.001973394,-0.0555043,0.011881908,0.001350217,-0.033069927,-0.026921248,0.022268193,0.028583053,-0.021021837,0.010884825,0.019692395,-0.005442413,0.031574301,-0.014956249,0.01238045,-0.006356406,0.006273315,-0.003095113,-0.014540797,-0.02176965,0.005006189,-0.002658889,0.042542219,-0.02176965,0.017199686,-0.016701145,-0.001599488,0.016950415,-0.021188019,0.017864408,0.023763817,-0.000669915,0.025093261,0.021104928,0.008807569,0.037390623,-0.025591804,-0.003178203,-0.001319058,0.020523297,0.005255459,0.019276943,-0.00226421,0.00760276,-0.057166107,-0.006896493,-0.034067012,0.043871664,0.038221523,0.008101301,0.03988333,0.015870241,0.000955538,-0.004299921,-0.002928932,-0.002118802,-0.020523297,-0.001168457,-0.011134096,-0.000685495,0.003323611,0.011549547,0.034565553,0.029247776,-0.029746316,0.005213914,0.019110762,-0.003302838,0.026422706,0.028915415,-0.036227357,0.033236109,0.038387705,-0.035230275,0.004071423,-0.021935832,0.002928932,0.000976311,0.000527104,-0.006854947,-0.003822153,-0.001199616,0.019858574,-0.002762751,0.039052427,-0.008641388,0.032239024,-0.002295369,0.035396457,0.044536386,-0.029413955,0.025093261,-0.03423319,-0.016867325,-0.008849114,0.008433662,-0.004486875,0.017033506,0.006730312,-0.008599843,-0.008225936,-0.024428539,0.006564131,-0.007561215,-0.032072846,-0.019941665,0.035396457,0.019276943,0.010261648,0.005857864,0.032239024,-0.044204023,-0.018944582,0.002409618,0.032903746,0.05517194,-0.03655972,0.007976666,0.030909581,-0.023929998,0.016368784,0.01528861,-0.00768585,0.02176965,0.013626805,-0.02459472,0.04021569,-0.032737568,0.006854947,-0.011383367,0.014873158,-0.02176965,0.00243039,0.0093892,0.0093892,-0.029580137,0.019858574,0.01827986,0.024428539,0.017864408,-0.028250692,-0.001111332,0.056169022,0.007478124,-0.010718645,0.041046593,-0.015704062,0.034731735,0.002523867,-0.032571387,0.004341467,-0.023597637,-0.011881908,-0.035562634,0.006688767,0.007810486,-0.012712811,0.022600554,0.03057722,0.022600554,0.010552464,0.0307434,-0.009638472,0.02176965,-0.018030589,0.024262359,-0.036227357,-0.020772567,0.001641033,-0.022932915,-0.014623888,0.018362951,0.002575798,0.006190225,-0.011051006,0.021021837,0.019110762,0.02127111,-0.028583053,-0.052180689,-0.014291527,-0.010552464,0.036393538,0.042542219,-0.04586583,-0.001869531,0.008350573,-0.008516753,-0.020772567,0.000294711,0.015704062,-0.014457707,-0.020772567,0.008766023,-0.026588887,-0.004736145,-0.028084511,-0.007519669,0.010552464,-0.016534964,0.006190225,0.012962082,-0.016618054,0.012546631,0.02459472,0.022932915,0.020440206,-0.027918331,-0.008059756,0.020689478,-0.014623888,-0.011466458,-0.006896493,-0.020024756,-0.031408124,0.021603471,0.007270399,-0.03057722,0.008350573,-0.021437289,0.00072704,-0.043871664,0.006314861,-0.017199686,0.02176965,0.024262359,-0.020357117,-0.000542683,-0.005213914,0.001963008,-0.00064395,-0.022434372,0.022102011,-0.006688767,-0.028583053,0.002191506,-0.005047734,0.002368073,0.014956249,0.023929998,-0.003302838,-0.032239024,0.022268193,-0.013377533,-0.010801735,0.003676744,0.009015295,-0.039550968,0.010884825,-0.033568468,0.013709894,-0.029413955,-0.006356406,-0.020274026,0.023597637,0.030909581,0.02176965,0.016285693,0.045533467,-0.024096178,-0.030909581,-0.026422706,0.002783524,-0.010594009,0.004362239,-0.070792913,0.009472291,-0.022102011,0.011134096,-0.017448956,-0.011549547,-0.056833744,0.00082571,0.026588887,-0.013709894,0.002575798,0.02176965,-0.000568649,-0.007270399,0.004279149,-0.042874578,-0.026588887,0.016784234,0.036725901,-0.028915415,-0.009513836,0.017448956,0.002035712,-0.007228854,0.011383367,0.011134096,0.028915415,0.0153717,-0.027087428,0.043871664,-0.005089279,0.006314861,0.014291527,-0.003240521,0.025924165,-0.001230775,-0.015454791,-0.012629721,0.031740483,-0.039717149,-0.031075761,0.006605676,-0.008641388,-0.032239024,0.037722982,-0.03705826,-0.024096178,0.001911076,0.018196769,-0.007353489,-0.011300277,-0.029081594,0.004590738,-0.018030589,-0.026588887,0.010261648,0.038221523,0.008392117,-0.01213118,0.018362951,-0.034731735,-0.017781317,-0.011632638,0.005255459,0.000851675,0.014208436,-0.000039922,-0.000228498,0.014790068,0.00913993,0.0004544,-0.011798819,-0.020440206,0.005899409,0.008350573,0.006314861,0.040548053,0.003427474,-0.010801735,0.008599843,0.002586185,-0.041212775,-0.016368784,0.020024756,0.000965924,-0.021021837,-0.008475208,0.0307434,0.00760276,0.003614427,0.003489791,-0.025924165,0.000799744,0.013460624,-0.020440206,0.048857078,0.004320694,-0.048857078,0.015039339,-0.029580137,0.025924165,0.018861491,-0.014706978,0.000576439,-0.031241942,0.0307434,0.0153717,0.014706978,0.028084511,-0.01238045,-0.031241942,0.018196769,-0.034897912,0.008142847,0.010718645,0.00922302,0.047859997,-0.00072704,-0.010427829,0.007104218,0.026256526,0.012214269,-0.013377533,-0.05184833,0.005276232,0.021935832,-0.007021128,0.009804652,0.007893575,0.024096178,-0.002357686,0.033900831,-0.031740483,0.034565553,-0.036892079,-0.015454791,0.030411039,0.010552464,-0.022268193,-0.001391762,-0.008184392,-0.008558298,0.008475208,-0.009929287,0.010427829,0.041378956,-0.009555381,-0.008724478,-0.039052427,0.034731735,-0.014291527,0.023099095,0.029081594,0.007519669,0.010967916,-0.008142847,0.006190225,-0.031075761,0.033734649,-0.001672192,0.047859997,-0.022434372,-0.007395034,0.01213118,0.056169022,0.002762751,-0.029413955,-0.000763392,-0.015787151,0.010801735,0.008142847,0.029912498,-0.0018176,0.033236109,-0.046198189,-0.002492708,-0.006730312,0.008807569,-0.03655972,0.009430746,-0.053842496,-0.060489718,0.046862911,0.002783524,-0.0187784,0.000571246,0.00760276,0.002482322,0.001319058,-0.014291527,0.001464466,-0.011632638,-0.012463541,-0.004902326,0.000841289,0.006688767,0.030244859,0.018944582,0.000532297,-0.015620971,0.007104218,0.005608593,0.002035712,-0.023763817,0.003032795,0.010594009,-0.023597637,-0.042376038,-0.005255459,0.001199616,-0.0247609,-0.007893575,-0.011632638,0.013045172,-0.005691683,-0.007104218,0.027419789,-0.004320694,-0.005525503,-0.026090344,0.031408124,-0.012795902,-0.007062673,0.000939959,0.000030185,0.004175286,0.014291527,0.033236109,-0.038720068,0.074116521,-0.019692395,0.001589101,0.013792985,-0.056169022,-0.028749233,-0.001599488,0.004175286,0.014790068,0.00162026,-0.007519669,-0.041378956,0.016534964,-0.003572882,-0.002575798,-0.019526213,-0.00922302,-0.033900831,-0.042043675,-0.014208436,0.010178559,0.017698228,0.032239024,0.00913993,0.009264565,-0.012463541,-0.005857864,-0.015870241,0.004486875,0.018861491,-0.000176567,-0.029912498,0.016784234,0.012546631,0.051183607,0.023597637,0.032903746,0.0153717,-0.013377533,-0.000016634,-0.061486799,-0.034565553,0.016119512,0.00380138,-0.003863698,0.004362239,-0.017532047,-0.002762751,0.000102565,-0.021437289,0.029247776,-0.010718645,-0.015870241,-0.016285693,0.010220103,-0.000373906,0.012962082,0.010137013,-0.007228854,0.02127111,-0.029247776,0.018113678,0.009181475,0.002233051,0.014374617,-0.00396756,0.010801735,0.007644305,0.020855658,0.014790068,0.032737568,-0.037390623,0.003032795,0.010801735,-0.01553788,-0.014790068,0.019526213,-0.017947499,-0.007893575,-0.011964999,-0.00614868,-0.005857864,-0.032072846,-0.025924165,0.001163264,-0.013294443,-0.01553788,0.016701145,-0.013460624,-0.001111332,0.00760276,0.01553788,-0.033734649,0.048192356,-0.003282066,0.031906664,0.002845842,0.003240521,0.017116595,-0.01827986,0.006896493,-0.00760276,-0.009680017,-0.02459472,-0.020689478,-0.053510133,0.00614868,-0.010552464,-0.032405205,-0.0307434,0.025093261,0.003635199,-0.008101301,-0.00606559,-0.007436579,0.00606559,-0.012962082,0.026921248,0.009098385,0.046530552,-0.011632638,0.032571387,-0.033900831,0.009846197,0.002866614,0.032903746,0.008973749,0.012712811,0.040049512,0.013626805,-0.026256526,-0.031408124,0.036227357,0.011964999,-0.006024044,-0.001848759,0.015704062,-0.021188019,-0.035064094,-0.013377533,-0.009721561,-0.01553788,0.008766023,0.005400868,0.004507647,-0.018362951,-0.026588887,-0.00913993,-0.025591804,0.035894997,0.021935832,-0.031906664,-0.000602404,0.026422706,-0.006397951,0.006647222,0.0093892,0.020606387,0.00913993,0.015620971,-0.024096178,0.00063616,-0.006564131,0.01238045,-0.013709894,0.000563456,-0.009887742,0.016618054,-0.003323611,0.000451803,0.001609874,0.008682934,0.025259443,0.020024756,-0.027253609,0.010884825,0.028250692,-0.054839578,0.033568468,-0.004902326,0.003053567,0.020274026,-0.015704062,-0.00614868,-0.063813329,0.002482322,0.009763107,-0.001609874,-0.012214269,0.020107845,0.001921462,0.018695312,-0.004923099,0.007270399,-0.023763817,0.005234687,0.003406701,0.002565412,0.007104218,0.000841289,0.016202603,0.01827986,-0.031075761,-0.035562634,-0.025259443,-0.007021128,0.000641353,-0.033069927,0.010718645,0.005650138,0.024927082,-0.002658889,0.00380138,0.009929287,-0.004258377,-0.039717149,-0.022434372,0.025425622,0.00198378,0.006356406,0.017615138,-0.032072846,0.046862911,-0.026921248,0.005940954,0.021603471,-0.002253824,0.002825069,-0.030411039,-0.003115885,0.023597637,-0.004320694,-0.007852031,0.018030589,-0.008724478,-0.005733229,0.032903746,0.013876075,0.015454791,-0.023597637,0.005151597,-0.035396457,0.02176965,-0.012463541,0.025591804,0.014540797,-0.027918331,0.004154514,0.008724478,0.016036423,-0.015870241,0.005400868,-0.017365867,-0.044868745,-0.000485559,0.020357117,-0.00760276,-0.023265276,-0.012048089,0.008433662,0.018362951,-0.006979583,0.0307434,0.008392117,0.027087428,-0.019360034,0.016119512,0.02127111,0.010801735,0.00299125,0.002949705,0.012463541,-0.000025966,0.015953332,0.029413955,0.020024756,0.003780607,0.022102011,-0.031740483,0.01553788,0.010386284,0.028749233,-0.010884825,0.008682934,-0.003531337,-0.05517194,-0.019360034,-0.009347656,-0.002025325,0.003261293,-0.025425622,-0.01553788,-0.000251867,0.014291527,0.012546631,0.035728816,-0.007062673,-0.006605676,0.000384293,-0.005047734,-0.032571387,-0.021188019,-0.02127111,-0.016036423,0.008475208,-0.004009106,0.014291527,-0.008101301,0.004424557,-0.038221523,-0.019360034,0.015039339,-0.015454791,-0.029580137,0.035728816,0.004466102,-0.000778971,-0.005068507,-0.017781317,0.00477769,0.001838372,0.030244859,0.01213118,-0.022932915,-0.005359322,0.037390623,0.005899409,0.002046098,0.037889164,0.016701145,0.010303194,0.02127111,-0.009513836,-0.022268193,-0.005650138,-0.00388447,0.016534964,-0.023265276,-0.00054528,0.004819236,0.004715373,-0.001178843,-0.051183607,-0.00614868,-0.010552464,-0.002741979,-0.009181475,0.023597637,0.019193852,0.017199686,-0.036393538,-0.00243039,-0.015870241,-0.014706978,-0.00145408,0.016368784,-0.011632638,-0.014623888,-0.01229736,-0.01553788,0.040880412,0.023929998,-0.014623888,0.002648502,0.031906664,-0.033734649,-0.026755067,0.002783524,0.005359322,0.009970833,0.001412535,0.016950415,0.016285693,-0.006730312,-0.02459472,0.050851244,-0.001827986,-0.020855658,0.020938748,0.004071423,-0.021603471,-0.007852031,-0.023929998,-0.029912498,-0.003365156,0.017365867,-0.010427829,-0.011715728,0.014956249,0.011383367,0.032405205,-0.028583053,-0.017448956,0.018446039,0.017615138,0.035728816,-0.010095468,-0.00254464,0.010012378,0.028250692,-0.020855658,-0.002305755,-0.001002276,-0.014125346,-0.007021128,-0.028583053,-0.045533467,-0.02758597,-0.020440206,0.001350217,0.010053922,0.020689478,-0.017615138,0.026422706,0.040880412,0.012463541,-0.010718645,-0.014706978,0.068134025,0.038720068,0.047859997,-0.012546631,0.015704062,-0.002087643,-0.010303194,0.014790068,0.018612221,0.007395034,-0.014790068,-0.017864408,-0.005068507,-0.054507218,0.004902326,-0.004050651,0.021603471,0.019775484,-0.024262359,-0.012795902,0.021935832,-0.004009106,-0.039717149,0.037556801,-0.016701145,-0.025757983,0.005483958,-0.005110051,-0.021935832,-0.003406701,0.010594009,0.015787151,-0.049854163,0.007727395,-0.008392117,-0.017199686,0.009970833,-0.008849114,-0.013876075,-0.0059825,-0.015870241,-0.007104218,0.028250692,-0.029081594,0.026921248,0.00299125,-0.017781317,0.042542219,0.018196769,0.052845411,-0.004819236,-0.014125346,0.02459472,-0.011715728,0.015787151,-0.005774774,0.004902326,-0.004964644,-0.02758597,-0.013959166,-0.033568468,-0.027918331,-0.017698228,0.003489791,-0.020024756,-0.021603471,0.019360034,0.028084511,-0.002503094,-0.018861491,-0.002295369,0.050851244,-0.020689478,-0.000459593,-0.026090344,0.002783524,-0.005899409,-0.026921248,-0.0093892,-0.004112968,0.031574301,0.003926015,-0.032903746,-0.046198189,-0.019027673,-0.00913993,0.030411039,-0.019443123,0.001963008,-0.005193142,0.010884825,-0.02127111,-0.025259443,0.032737568,0.00089322,0.003282066,0.001713737,-0.006439496,0.016867325,-0.031574301,0.031075761,-0.009970833,0.022600554,-0.023597637,-0.014956249,0.004009106,0.00198378,0.026588887,-0.023431456,-0.023763817,-0.013294443,-0.029746316,0.001381376,-0.042874578,-0.00913993,0.014873158,0.016202603,0.012878992,-0.006024044,0.009638472,0.010552464,-0.017033506,-0.027087428,0.044536386,-0.038055345,0.001329444,-0.019609304,0.023597637,-0.043206941,0.040049512,0.017615138,0.046862911,0.02127111,0.013294443,-0.039550968,-0.018861491,-0.019609304,-0.033734649,0.00623177,-0.017199686,0.041212775,-0.017781317,-0.024262359,0.054507218,-0.009721561,0.005816319,-0.00206687,-0.008766023,0.017365867,-0.000737426,0.018362951,-0.023597637,-0.019110762,0.021935832,0.041545134,-0.020357117,-0.017615138,0.044868745,-0.018030589,-0.032405205,-0.050186522,-0.014540797,0.005213914,-0.006688767,0.047527634,0.040714234];

    このファイルには、クエリタームtime travel の埋め込みが含まれています。

  2. mongoshで、ファイルをmongosh にロードしてクエリで埋め込みを使用します。

    load('/<path-to-file>/query-embeddings.js');
  3. 次のクエリを実行します。

    1use sample_mflix
    2db.moviesWithEmbeddings.aggregate([
    3 {
    4 "$vectorSearch": {
    5 "index": "embeddingsIndex",
    6 "path": "plot_embedding_voyage_3_large",
    7 "queryVector": TIME_TRAVEL_EMBEDDING,
    8 "numCandidates": 100,
    9 "limit": 10
    10 }
    11 },
    12 {
    13 "$project": {
    14 "_id": 0,
    15 "plot": 1,
    16 "title": 1,
    17 }
    18 }
    19])
    [
    {
    plot: 'At the age of 21, Tim discovers he can travel in time and change what happens and has happened in his own life. His decision to make his world a better place by getting a girlfriend turns out not to be as easy as you might think.',
    title: 'About Time'
    },
    {
    plot: 'A psychiatrist makes multiple trips through time to save a woman that was murdered by her brutal husband.',
    title: 'Retroactive'
    },
    {
    plot: 'A time-travel experiment in which a robot probe is sent from the year 2073 to the year 1973 goes terribly wrong thrusting one of the project scientists, a man named Nicholas Sinclair into a...',
    title: 'A.P.E.X.'
    },
    {
    plot: 'An officer for a security agency that regulates time travel, must fend for his life against a shady politician who has a tie to his past.',
    title: 'Timecop'
    },
    {
    plot: 'After visiting 2015, Marty McFly must repeat his visit to 1955 to prevent disastrous changes to 1985... without interfering with his first trip.',
    title: 'Back to the Future Part II'
    },
    {
    plot: 'A reporter, learning of time travelers visiting 20th century disasters, tries to change the history they know by averting upcoming disasters.',
    title: 'Thrill Seekers'
    },
    {
    plot: 'Lyle, a motorcycle champion is traveling the Mexican desert, when he find himself in the action radius of a time machine. So he find himself one century back in the past between rapists, ...',
    title: 'Timerider: The Adventure of Lyle Swann'
    },
    {
    plot: 'Hoping to alter the events of the past, a 19th century inventor instead travels 800,000 years into the future, where he finds humankind divided into two warring races.',
    title: 'The Time Machine'
    },
    {
    plot: 'A romantic drama about a Chicago librarian with a gene that causes him to involuntarily time travel, and the complications it creates for his marriage.',
    title: "The Time Traveler's Wife"
    },
    {
    plot: 'A modern aircraft carrier is thrown back in time to 1941 near Hawaii, just hours before the Japanese attack on Pearl Harbor.',
    title: 'The Final Countdown'
    }
    ]

非常に複雑なビュー変換では、Atlas がビューを読み取ってソースコレクションをフィルタリングおよび変換する際にパフォーマンスが低下する可能性があります。このシナリオでは、Atlas で追加のレプリケーション負荷を回避するために、マテリアライズドビュー の作成を検討してください。ビュー変換によって発生するクエリレイテンシを回避するには、ソースコレクションに対して直接クエリを実行して元のドキュメントを取得します。

インデックスは次のシナリオで FAILED ステータスに変更されます。

  • Atlas Vector Search と互換性のないビューにインデックスを作成します。

  • Atlas Vector Search の互換性要件を満たさない方法でビューを編集します。

  • ビューのソース コレクションを削除または変更します。

    たとえば、1 つのビューが別のビュー上に作成され、親ビューのソースを別のコレクションに変更した場合です。

    注意

    この制限は、ビューが他のビューの子である場合にも適用されます。たとえば、すべての子が由来するソース コレクションを変更または削除することはできません。

インデックスは次のシナリオで STALE ステータスに変更されます。

警告

ビューで定義された集計パイプラインがコレクション内のドキュメントと互換性がない場合、検索レプリケーションは失敗します。たとえば、$toDouble 式が配列を含むドキュメント フィールドに対して操作されると、レプリケーションは失敗します。ビューがコレクション内のすべてのドキュメントでエラーなく動作することを確認してください。

  • インデックスが READY のときにビュー定義によって集計が失敗した場合、インデックスはSTALE になります。ドキュメントを解決するかビュー定義を変更して失敗しないようにすると、インデックスはREADY に戻ります。STALE の場合でも、インデックスは引き続きクエリ可能です。インデックスがoplogから削除されると、インデックスの再構築がトリガーされます。

  • インデックスが BUILDING の時にビュー定義によって集計パイプラインに障害が発生した場合、インデックス構築はそのドキュメントが修正されるまで停止します。ドキュメントを解決するか、ビュー定義を変更すると、インデックスは READY に戻り、失敗しなくなります。

Atlas UI で「インデックス ステータスの詳細」ページを表示して、インデックス ステータスを確認できます。

このエラーは、8.1 より前のバージョンのMongoDBを使用してビューをクエリすると表示されます。

  • 8.0 より前のバージョンのMongoDBを使用している場合は、ビューを直接クエリするために 8.1+ にアップグレードすることをお勧めします。ソースコレクションをクエリするには、 8.0 にアップグレードします。

  • MongoDB 8.0 を使用する場合は、 ソースコレクションに対してビューインデックスをクエリする必要があります。例、ビューではなくコレクションで .aggregate() を実行します。

ビューで Atlas Vector Search インデックスを作成すると、mongot プロセスは通常のコレクションで Atlas Vector Search インデックスを作成する場合と同じタスクを実行します。mongot プロセス:

  1. コレクションのインデックス定義のルールに基づいて Atlas Vector Search インデックスを作成します。

  2. Atlas Vector Search インデックスを定義したコレクションについて、ドキュメントとインデックスの現在の状態に関する変更ストリームをモニターします。

  3. Atlas Vector Search のクエリを処理し、mongod に一致するドキュメントのドキュメント ID およびその他の検索メタデータを返し、その後ドキュメントの全文検索を実行し、結果をクライアントに返します。

ビューで Atlas Vector Search インデックスを作成すると、ステップ 1 と 2 の間にビュー定義が適用され、変換されたドキュメントはディスク上の Atlas Vector Search インデックスに保存されます。

ビューの詳細については、「ビュー」を参照してください。

ビューに Atlas Searchインデックスを作成するには、Atlas Search でビューを使用する を参照してください。

戻る

複合ベクトル検索

ルール バッジを取得する

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

詳細

項目一覧