diff --git a/Documentation/7.0/Raven.Documentation.Pages/ai-integration/vector-search-using-static-index.dotnet.markdown b/Documentation/7.0/Raven.Documentation.Pages/ai-integration/vector-search-using-static-index.dotnet.markdown index bf42523b1..8f7922ffa 100644 --- a/Documentation/7.0/Raven.Documentation.Pages/ai-integration/vector-search-using-static-index.dotnet.markdown +++ b/Documentation/7.0/Raven.Documentation.Pages/ai-integration/vector-search-using-static-index.dotnet.markdown @@ -169,7 +169,8 @@ Results will include _Product_ documents where the `Name` field is similar to th {CODE-TAB:csharp:RawQuery_async query_3_async@AiIntegration\VectorSearchUsingStaticIndex.cs /} {CODE-TAB-BLOCK:sql:RQL} from index "Products/ByVector/Text" -where vector.search(VectorFromText, "italian food", 0.82, 20) +// Wrap the 'vector.search' query with 'exact()' to perform an exact search +where exact(vector.search(VectorFromText, "italian food", 0.82, 20)) {CODE-TAB-BLOCK/} {CODE-TABS/} @@ -251,7 +252,7 @@ This allows you to query across all fields using various predicates. {CODE-TAB:csharp:IndexDefinition index_12@AiIntegration\VectorSearchUsingStaticIndex.cs /} {CODE-TABS/} -Execute a query that combines predicates (using `OR`) across all index-field types: +Execute a query that combines predicates across all index-field types: {CODE-TABS} {CODE-TAB:csharp:DocumentQuery query_10@AiIntegration\VectorSearchUsingStaticIndex.cs /} diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingDynamicQuery.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingDynamicQuery.cs index a94a45a66..b15c90b2d 100644 --- a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingDynamicQuery.cs +++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingDynamicQuery.cs @@ -288,7 +288,7 @@ where vector.search(TagsEmbeddedAsSingle, $p0, 0.85, 10) // (provide a single vector from the vector list in the TagsEmbeddedAsInt8 field) searchVector => searchVector.ByEmbedding( // The provided vector MUST be in the same format as was stored in your document - // Call 'VectorQuantizer.ToInt8' to transform the rawData to the Int8 format + // Call 'VectorQuantizer.ToInt8' to transform the raw data to the Int8 format VectorQuantizer.ToInt8(new float[] { 0.1f, 0.2f }))) .Customize(x => x.WaitForNonStaleResults()) .ToList(); diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingStaticIndex.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingStaticIndex.cs index 4659fabfb..6580620ea 100644 --- a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingStaticIndex.cs +++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearchUsingStaticIndex.cs @@ -537,7 +537,7 @@ public async Task QueryExamples() field => field .WithField(x => x.VectorFromText), searchTerm => searchTerm - .ByText("italian food"), 0.82f, 20) + .ByText("italian food"), 0.82f, 20, isExact: true) .Customize(x => x.WaitForNonStaleResults()) .OfType() .ToListAsync(); @@ -553,7 +553,7 @@ public async Task QueryExamples() field => field .WithField(x => x.VectorFromText), searchTerm => searchTerm - .ByText("italian food"), 0.82f, 20) + .ByText("italian food"), 0.82f, 20, isExact: true) .WaitForNonStaleResults() .OfType() .ToList(); @@ -570,7 +570,7 @@ public async Task QueryExamples() .WithField(x => x.VectorFromText), searchTerm => searchTerm .ByText("italian food"), - 0.82f, 20) + 0.82f, 20, isExact: true) .WaitForNonStaleResults() .OfType() .ToListAsync(); @@ -583,7 +583,8 @@ public async Task QueryExamples() var similarProducts = session.Advanced .RawQuery(@" from index 'Products/ByVector/Text' - where vector.search(VectorFromText, 'italian food', 0.82, 20)") + // Wrap the 'vector.search' query with 'exact()' to perform an exact search + where exact(vector.search(VectorFromText, 'italian food', 0.82, 20))") .WaitForNonStaleResults() .ToList(); #endregion @@ -595,7 +596,8 @@ where vector.search(VectorFromText, 'italian food', 0.82, 20)") var similarProducts = await asyncSession.Advanced .AsyncRawQuery(@" from index 'Products/ByVector/Text' - where vector.search(VectorFromText, 'italian food', 0.82, 20)") + // Wrap the 'vector.search' query with 'exact()' to perform an exact search + where exact(vector.search(VectorFromText, 'italian food', 0.82, 20))") .WaitForNonStaleResults() .ToListAsync(); #endregion