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
- Adding model building API to configure property as full-text search enabled, as well as setup the index for it,
- Adding model validation (e.g. FTS index not matching FTS property),
- Adding EF.Functions stubs and translations for FullTextContains, FullTextContainsAll, FullTextContainsAny, FullTextScore and RRF (for hybrid),
- Adding logic in SelectExpression to produce ORDER BY RANK when necessary,
- Adding validation when attempting to mix with ORDER BY RANK with regular ORDER BY,
- Rewrite OFFSET/LIMIT from parameter to constant when ORDER BY RANK is present.
outstanding work:
- support for FTS Container building using Azure.ResourceManager.CosmosDb (currently blocked)
- support for Owned types (adjust model in tests and fix paths) - this also needs to happen for vector search
- add model building support for default language,
- add more tests for hybrid search,
- add more model validation tests for invalid scenarios (index on multiple columns, FTS on non-string etc)
- add xml docs,
- clean up exception messages and put them in a resource file,
Fixes#35476Fixes#35853Fixes#35867
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
103
+
/// </summary>
104
+
/// <remarks>
105
+
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
106
+
/// <see href="https://aka.ms/efcore-docs-cosmos">Accessing Azure Cosmos DB with EF Core</see> for more information and examples.
107
+
/// </remarks>
108
+
/// <param name="indexBuilder">The builder for the index being configured.</param>
109
+
/// <param name="value">The value indicating whether the index is configured for Full-text search.</param>
110
+
/// <returns>A builder to further configure the index.</returns>
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
121
+
/// </summary>
122
+
/// <remarks>
123
+
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
124
+
/// <see href="https://aka.ms/efcore-docs-cosmos">Accessing Azure Cosmos DB with EF Core</see> for more information and examples.
125
+
/// </remarks>
126
+
/// <param name="indexBuilder">The builder for the index being configured.</param>
127
+
/// <param name="value">The value indicating whether the index is configured for Full-text search.</param>
128
+
/// <returns>A builder to further configure the index.</returns>
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
137
+
/// </summary>
138
+
/// <remarks>
139
+
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
140
+
/// <see href="https://aka.ms/efcore-docs-cosmos">Accessing Azure Cosmos DB with EF Core</see> for more information and examples.
141
+
/// </remarks>
142
+
/// <param name="indexBuilder">The builder for the index being configured.</param>
143
+
/// <param name="value">The value indicating whether the index is configured for Full-text search.</param>
144
+
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
145
+
/// <returns>
146
+
/// The same builder instance if the configuration was applied,
/// Returns the value indicating whether the index is configured for Full-text search.
67
+
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
68
+
/// </summary>
69
+
/// <param name="index">The index.</param>
70
+
/// <returns>The index type to use, or <see langword="null" /> if none is set.</returns>
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
79
+
/// </summary>
80
+
/// <param name="index">The index.</param>
81
+
/// <param name="value">The value indicating whether the index is configured for Full-text search.</param>
/// See <see href="https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search">Full-text search in Azure Cosmos DB for NoSQL</see> for more information.
88
+
/// </summary>
89
+
/// <param name="index">The index.</param>
90
+
/// <param name="value">The value indicating whether the index is configured for Full-text search.</param>
91
+
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
92
+
/// <returns>The configured value.</returns>
93
+
publicstaticstring?SetFullTextIndex(
94
+
thisIConventionIndexindex,
95
+
bool?value,
96
+
boolfromDataAnnotation=false)
97
+
=>(string?)index.SetAnnotation(
98
+
CosmosAnnotationNames.FullTextIndex,
99
+
value,
100
+
fromDataAnnotation)?.Value;
101
+
102
+
/// <summary>
103
+
/// Returns the <see cref="ConfigurationSource" /> for whether the <see cref="IsFullTextIndex" />.
104
+
/// </summary>
105
+
/// <param name="property">The property.</param>
106
+
/// <returns>The <see cref="ConfigurationSource" /> for whether the index is clustered.</returns>
0 commit comments