Skip to content

Commit e723ee6

Browse files
authored
Merge pull request #2032 from Danielle9897/RDoc-3328-fixDoubleBrackets
RDoc-3328 Fix the double brackets in JS indexes
2 parents 5f22949 + f9830e1 commit e723ee6

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingDynamicQuery.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using Raven.Client.Documents.Queries.Vector;
1111
using Raven.Documentation.Samples.Orders;
1212

13-
namespace Raven.Documentation.Samples.AiIntegration
13+
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
1414
{
1515
public class VectorSearchUsingDynamicQuery
1616
{

Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingStaticIndex.cs

+21-21
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Raven.Client.Documents.Queries.Vector;
99
using Raven.Documentation.Samples.Orders;
1010

11-
namespace Raven.Documentation.Samples.AiIntegration
11+
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
1212
{
1313
public class VectorSearchUsingStaticIndex
1414
{
@@ -67,11 +67,11 @@ public Products_ByVector_Text_JS()
6767
{
6868
Maps = new HashSet<string>()
6969
{
70-
$@"map('Products', function (product) {{
71-
return {{
70+
@"map('Products', function (product) {
71+
return {
7272
VectorFromText: createVector(product.Name)
73-
}};
74-
}})"
73+
};
74+
})"
7575
};
7676

7777
Fields = new();
@@ -145,11 +145,11 @@ public Movies_ByVector_Single_JS()
145145
{
146146
Maps = new HashSet<string>()
147147
{
148-
$@"map('Movies', function (movie) {{
149-
return {{
148+
@"map('Movies', function (movie) {
149+
return {
150150
VectorFromSingle: createVector(movie.TagsEmbeddedAsSingle)
151-
}};
152-
}})"
151+
};
152+
})"
153153
};
154154

155155
Fields = new();
@@ -224,11 +224,11 @@ public Movies_ByVector_Int8_JS()
224224
{
225225
Maps = new HashSet<string>()
226226
{
227-
$@"map('Movies', function (movie) {{
228-
return {{
227+
@"map('Movies', function (movie) {
228+
return {
229229
VectorFromInt8Arrays: createVector(movie.TagsEmbeddedAsInt8)
230-
}};
231-
}})"
230+
};
231+
})"
232232
};
233233

234234
Fields = new();
@@ -294,13 +294,13 @@ public Products_ByMultipleFields_JS()
294294
{
295295
Maps = new HashSet<string>()
296296
{
297-
$@"map('Products', function (product) {{
298-
return {{
297+
@"map('Products', function (product) {
298+
return {
299299
PricePerUnit: product.PricePerUnit,
300300
Name: product.Name,
301301
VectorFromText: createVector(product.Name)
302-
}};
303-
}})"
302+
};
303+
})"
304304
};
305305

306306
Fields = new();
@@ -357,12 +357,12 @@ public Categories_ByPreMadeTextEmbeddings_JS()
357357
{
358358
Maps = new HashSet<string>()
359359
{
360-
$@"map('Categories', function (category) {{
361-
return {{
360+
@"map('Categories', function (category) {
361+
return {
362362
VectorFromTextEmbeddings:
363363
loadVector('Name', 'id-for-task-open-ai')
364-
}};
365-
}})"
364+
};
365+
})"
366366
};
367367

368368
Fields = new();

Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchWithAttachments.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using Raven.Client.Documents.Operations.Indexes;
1212
using Raven.Documentation.Samples.Orders;
1313

14-
namespace Raven.Documentation.Samples.AiIntegration
14+
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
1515
{
1616
public class VectorSearchWithAttachments
1717
{
@@ -67,15 +67,15 @@ public Companies_ByVector_FromTextAttachment_JS()
6767
{
6868
Maps = new HashSet<string>
6969
{
70-
$@"map('Companies', function (company) {{
70+
@"map('Companies', function (company) {
7171
7272
var attachment = loadAttachment(company, 'description.txt');
7373
if (!attachment) return null;
7474
75-
return {{
75+
return {
7676
VectorFromAttachment: createVector(attachment.getContentAsString('utf8'))
77-
}};
78-
}})"
77+
};
78+
})"
7979
};
8080

8181
Fields = new Dictionary<string, IndexFieldOptions>()
@@ -146,15 +146,15 @@ public Companies_ByVector_FromNumericalAttachment_JS()
146146
{
147147
Maps = new HashSet<string>()
148148
{
149-
$@"map('Companies', function (company) {{
149+
@"map('Companies', function (company) {
150150
151151
var attachment = loadAttachment(company, 'vector_base64.raw');
152152
if (!attachment) return null;
153153
154-
return {{
154+
return {
155155
VectorFromAttachment: createVector(attachment.getContentAsString('utf8'))
156-
}};
157-
}})"
156+
};
157+
})"
158158
};
159159

160160
Fields = new();

0 commit comments

Comments
 (0)