File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed
docs/60-perform-semantic-search Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ The answers for code blocks in this section are as follows:
2222 " numDimensions" : 1024 ,
2323 " path" : " embedding" ,
2424 " similarity" : " cosine" ,
25- " type" : " vector" ,
25+ " type" : " vector"
2626 },
2727 {
2828 " path" : " metadata.language"
29- " type" : " filter" ,
30- },
29+ " type" : " filter"
30+ }
3131 ]
3232}
3333```
@@ -48,16 +48,16 @@ The answers for code blocks in this section are as follows:
4848 " path" : " embedding" ,
4949 " numCandidates" : 150 ,
5050 " limit" : 5 ,
51- " filter" : {" metadata.language" : " en" },
51+ " filter" : {" metadata.language" : " en" }
5252 }
5353 },
5454 {
5555 " $project" : {
5656 " _id" : 0 ,
5757 " page_content" : 1 ,
58- " score" : {" $meta" : " vectorSearchScore" },
58+ " score" : {" $meta" : " vectorSearchScore" }
5959 }
60- },
60+ }
6161]
6262```
6363</div >
@@ -75,16 +75,16 @@ The answers for code blocks in this section are as follows:
7575 " numDimensions" : 1024 ,
7676 " path" : " embedding" ,
7777 " similarity" : " cosine" ,
78- " type" : " vector" ,
78+ " type" : " vector"
7979 },
8080 {
8181 " path" : " metadata.language"
82- " type" : " filter" ,
82+ " type" : " filter"
8383 },
8484 {
8585 " path" : " type"
86- " type" : " filter" ,
87- },
86+ " type" : " filter"
87+ }
8888 ]
8989}
9090```
@@ -105,16 +105,21 @@ The answers for code blocks in this section are as follows:
105105 " path" : " embedding" ,
106106 " numCandidates" : 150 ,
107107 " limit" : 5 ,
108- " filter" : {" $and" : [{" metadata.language" : " en" }, {" type" : " Document" }]},
108+ " filter" : {
109+ " $and" : [
110+ {" metadata.language" : " en" },
111+ {" type" : " Document" }
112+ ]
113+ }
109114 }
110115 },
111116 {
112117 " $project" : {
113118 " _id" : 0 ,
114119 " page_content" : 1 ,
115- " score" : {" $meta" : " vectorSearchScore" },
120+ " score" : {" $meta" : " vectorSearchScore" }
116121 }
117- },
122+ }
118123]
119124```
120125</div >
You can’t perform that action at this time.
0 commit comments