You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entity-framework/core/providers/cosmos/full-text-search.md
-3
Original file line number
Diff line number
Diff line change
@@ -73,9 +73,6 @@ You can also set a default language for the container - unless overridden in the
73
73
}
74
74
```
75
75
76
-
> [!NOTE]
77
-
> Configuring the index is not mandatory, but it is recommended as it greatly improves performance of full-text search queries.
78
-
79
76
## Querying
80
77
81
78
As part of the full-text search feature, Azure Cosmos DB introduced several built-in functions which allow for efficient querying of content inside the full-text search enabled properties. These functions are: [`FullTextContains`](/azure/cosmos-db/nosql/query/fulltextcontains), [`FullTextContainsAll`](/azure/cosmos-db/nosql/query/fulltextcontainsall), [`FullTextContainsAny`](/azure/cosmos-db/nosql/query/fulltextcontainsany), which look for specific keyword or keywords and [`FullTextScore`](/azure/cosmos-db/nosql/query/fulltextscore), which returns [BM25 score](https://en.wikipedia.org/wiki/Okapi_BM25) based on provided keywords.
Copy file name to clipboardExpand all lines: entity-framework/core/providers/cosmos/vector-search.md
+6
Original file line number
Diff line number
Diff line change
@@ -53,3 +53,9 @@ var blogs = await context.Blogs
53
53
```
54
54
55
55
This will returns the top five Blogs, based on the similarity of their `Vector` property and the externally-provided `anotherVector` data.
56
+
57
+
## Hybrid search
58
+
59
+
Vector similarity search can be used with full-text search in the same query (i.e. hybrid search), by combining results of `VectorDistance` and `FullTextScore` functions using the [`RRF`](/azure/cosmos-db/nosql/query/rrf) (Reciprocal Rank Fusion) function.
60
+
61
+
See [documentation](xref:core/providers/cosmos/full-text-search?#hybrid-search) to learn how to enable full-text search support in EF model and how to use hybrid search in queries.
Copy file name to clipboardExpand all lines: entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md
+49-1
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,55 @@ EF10 requires the .NET 10 SDK to build and requires the .NET 10 runtime to run.
26
26
### Full-text search support
27
27
28
28
Azure Cosmos DB now offers support for [full-text search](/azure/cosmos-db/gen-ai/full-text-search). It enables efficient and effective text searches, as well as evaluating the relevance of documents to a given search query. It can be used in combination with vector search to improve the accuracy of responses in some AI scenarios.
29
-
EF Core 10 is adding support for this feature allowing for modeling the database with full-text search enabled properties and using full-text search functions inside queries targeting Azure Cosmos DB. See [documentation](xref:core/providers/cosmos/full-text-search) to learn how to take advantage of full-text search using EF Core.
29
+
EF Core 10 is adding support for this feature allowing for modeling the database with full-text search enabled properties and using full-text search functions inside queries targeting Azure Cosmos DB.
30
+
31
+
Here is a basic EF model configuration enabling full-text search on one of the properties:
The following full-text operations are currently supported: [`FullTextContains`](/azure/cosmos-db/nosql/query/fulltextcontains), [`FullTextContainsAll`](/azure/cosmos-db/nosql/query/fulltextcontainsall), [`FullTextContainsAny`](/azure/cosmos-db/nosql/query/fulltextcontainsany), [`FullTextScore`](/azure/cosmos-db/nosql/query/fulltextscore).
63
+
64
+
#### Hybrid search
65
+
66
+
EF Core also supports [`RRF`](/azure/cosmos-db/nosql/query/rrf) (Reciprocal Rank Fusion) function, which combines vector similarity search and full-text search (i.e. hybrid search). Here is an example query using hybrid search:
67
+
68
+
```c#
69
+
float[] myVector=/* generate vector data from text, image, etc. */
0 commit comments