Skip to content

Commit

Permalink
RDoc-3122 small text fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielle9897 committed Jan 29, 2025
1 parent d36f33f commit d9c539c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/}

Expand Down Expand Up @@ -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 /}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Product>()
.ToListAsync();
Expand All @@ -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<Product>()
.ToList();
Expand All @@ -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<Product>()
.ToListAsync();
Expand All @@ -583,7 +583,8 @@ public async Task QueryExamples()
var similarProducts = session.Advanced
.RawQuery<Product>(@"
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
Expand All @@ -595,7 +596,8 @@ where vector.search(VectorFromText, 'italian food', 0.82, 20)")
var similarProducts = await asyncSession.Advanced
.AsyncRawQuery<Product>(@"
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
Expand Down

0 comments on commit d9c539c

Please sign in to comment.