Skip to content

RDoc-3328 Fix the double brackets in JS indexes #2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Raven.Client.Documents.Queries.Vector;
using Raven.Documentation.Samples.Orders;

namespace Raven.Documentation.Samples.AiIntegration
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
{
public class VectorSearchUsingDynamicQuery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Raven.Client.Documents.Queries.Vector;
using Raven.Documentation.Samples.Orders;

namespace Raven.Documentation.Samples.AiIntegration
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
{
public class VectorSearchUsingStaticIndex
{
Expand Down Expand Up @@ -67,11 +67,11 @@ public Products_ByVector_Text_JS()
{
Maps = new HashSet<string>()
{
$@"map('Products', function (product) {{
return {{
@"map('Products', function (product) {
return {
VectorFromText: createVector(product.Name)
}};
}})"
};
})"
};

Fields = new();
Expand Down Expand Up @@ -145,11 +145,11 @@ public Movies_ByVector_Single_JS()
{
Maps = new HashSet<string>()
{
$@"map('Movies', function (movie) {{
return {{
@"map('Movies', function (movie) {
return {
VectorFromSingle: createVector(movie.TagsEmbeddedAsSingle)
}};
}})"
};
})"
};

Fields = new();
Expand Down Expand Up @@ -224,11 +224,11 @@ public Movies_ByVector_Int8_JS()
{
Maps = new HashSet<string>()
{
$@"map('Movies', function (movie) {{
return {{
@"map('Movies', function (movie) {
return {
VectorFromInt8Arrays: createVector(movie.TagsEmbeddedAsInt8)
}};
}})"
};
})"
};

Fields = new();
Expand Down Expand Up @@ -294,13 +294,13 @@ public Products_ByMultipleFields_JS()
{
Maps = new HashSet<string>()
{
$@"map('Products', function (product) {{
return {{
@"map('Products', function (product) {
return {
PricePerUnit: product.PricePerUnit,
Name: product.Name,
VectorFromText: createVector(product.Name)
}};
}})"
};
})"
};

Fields = new();
Expand Down Expand Up @@ -357,12 +357,12 @@ public Categories_ByPreMadeTextEmbeddings_JS()
{
Maps = new HashSet<string>()
{
$@"map('Categories', function (category) {{
return {{
@"map('Categories', function (category) {
return {
VectorFromTextEmbeddings:
loadVector('Name', 'id-for-task-open-ai')
}};
}})"
};
})"
};

Fields = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Raven.Client.Documents.Operations.Indexes;
using Raven.Documentation.Samples.Orders;

namespace Raven.Documentation.Samples.AiIntegration
namespace Raven.Documentation.Samples.AiIntegration.VectorSearch
{
public class VectorSearchWithAttachments
{
Expand Down Expand Up @@ -67,15 +67,15 @@ public Companies_ByVector_FromTextAttachment_JS()
{
Maps = new HashSet<string>
{
$@"map('Companies', function (company) {{
@"map('Companies', function (company) {

var attachment = loadAttachment(company, 'description.txt');
if (!attachment) return null;

return {{
return {
VectorFromAttachment: createVector(attachment.getContentAsString('utf8'))
}};
}})"
};
})"
};

Fields = new Dictionary<string, IndexFieldOptions>()
Expand Down Expand Up @@ -146,15 +146,15 @@ public Companies_ByVector_FromNumericalAttachment_JS()
{
Maps = new HashSet<string>()
{
$@"map('Companies', function (company) {{
@"map('Companies', function (company) {

var attachment = loadAttachment(company, 'vector_base64.raw');
if (!attachment) return null;

return {{
return {
VectorFromAttachment: createVector(attachment.getContentAsString('utf8'))
}};
}})"
};
})"
};

Fields = new();
Expand Down
Loading