{"id":18389360,"url":"https://github.com/rightpoint/azure-search-query-builder","last_synced_at":"2025-04-12T06:28:49.527Z","repository":{"id":143418190,"uuid":"242136796","full_name":"Rightpoint/Azure-Search-Query-Builder","owner":"Rightpoint","description":"This is a library that uses expression tree parsing to build a parameters object for performing search, suggest, and autocomplete actions with the Azure Search .NET SDK.","archived":false,"fork":false,"pushed_at":"2022-12-08T15:19:00.000Z","size":96,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-16T00:48:13.896Z","etag":null,"topics":["azure-search","c-sharp","dot-net","dot-net-standard","expression-parser","expression-tree","odata"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rightpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-21T12:42:04.000Z","updated_at":"2021-05-23T23:17:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9a68208-db11-4152-9744-bcd617a5e957","html_url":"https://github.com/Rightpoint/Azure-Search-Query-Builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAzure-Search-Query-Builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAzure-Search-Query-Builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAzure-Search-Query-Builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FAzure-Search-Query-Builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/Azure-Search-Query-Builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248527883,"owners_count":21119171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-search","c-sharp","dot-net","dot-net-standard","expression-parser","expression-tree","odata"],"created_at":"2024-11-06T01:42:46.331Z","updated_at":"2025-04-12T06:28:49.495Z","avatar_url":"https://github.com/Rightpoint.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure-Search-Query-Builder\nThis is a library that uses expression tree parsing to build a Options object for performing search, suggest, and autocomplete actions with the Azure Search .NET SDK.\n\n![ASP.NET Core CI](https://github.com/rightpoint/Azure-Search-Query-Builder/workflows/ASP.NET%20Core%20CI/badge.svg)\n![CodeQL](https://github.com/rightpoint/Azure-Search-Query-Builder/workflows/CodeQL/badge.svg)\n\n\n\n\n## [AutocompleteOptionsBuilder](AzureSearchQueryBuilder/Builders/AutocompleteOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.AutocompleteOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.AutocompleteOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### static IAutocompleteOptionsBuilder\\\u003cTModel\u003e Create()\nCreate a new IAutocompleteOptionsBuilder\\\u003cTModel\u003e.\n### Example using models from [How to use Azure Search from a .NET Application](https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk#how-the-net-sdk-handles-documents)\n```C#\nAutocompleteOptionsBuilder\u003cHotel\u003e.Create()\n  .Where(hotel =\u003e hotel.HotelId == \"Some ID\" || hotel.HotelName == \"Some Name\")\n  .Where(hotel =\u003e hotel.ParkingIncluded == true)\n  .WithAutocompleteMode(AutocompleteMode.OneTerm)\n  .WithHighlightPostTag(\"Post Tag\")\n  .WithHighlightPreTag(\"Pre Tag\")\n  .WithMinimumCoverage(0.75)\n  .WithSearchField(hotel =\u003e hotel.HotelName)\n  .WithSearchField(hotel =\u003e hotel.Description)\n  .WithSize(10)\n  .WithUseFuzzyMatching(true)\n  .Build();\n```\n| Property         | Value                                                                                |\n| ---------------- | ------------------------------------------------------------------------------------ |\n| AutocompleteMode | OneTerm                                                                              |\n| Filter           | ((HotelId eq 'Some ID') or (HotelName eq 'Some Name')) and (ParkingIncluded eq true) |\n| HighlightPostTag | Post Tag                                                                             |\n| HighlightPreTag  | Pre Tag                                                                              |\n| MinimumCoverage  | 0.75                                                                                 |\n| SearchFields     | HotelName, Description                                                               |\n| Size              | 10                                                                                   |\n| UseFuzzyMatching | True                                                                                 |\n\n\n\n\n## [IAutocompleteOptionsBuilder](AzureSearchQueryBuilder/Builders/IAutocompleteOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.AutocompleteOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.AutocompleteOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### AutocompleteOptions Build()\nBuild a [Azure.Search.Documents.AutocompleteOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.AutocompleteOptions) object.\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithAutocompleteMode(AutocompleteMode autocompleteMode)\nSets the autocomplete mode.\n- autocompleteMode: The desired [Azure.Search.Documents.AutocompleteMode](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.AutocompleteMode).\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithUseFuzzyMatching(bool? useFuzzyMatching)\nSets the use fuzzy matching value.\n- useFuzzyMatching: The desired fuzzy matching mode.\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e Where(Expression\u003cBooleanLambdaDelegate\\\u003cTModel\u003e\u003e lambdaExpression)\nAdds a where clause to the filter expression.\n- lambdaExpression: The lambda expression used to generate a filter expression.\n```C#\n.Where(model =\u003e model.Property == value)\n```\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithHighlightPostTag(string highlightPostTag)\nSets the string tag that appends to search hits.\n- highlightPostTag: the desired tag.\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithHighlightPreTag(string highlightPreTag)\nSets the string tag that prepends to search hits.\n- highlightPreTag: the desired tag.\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithMinimumCoverage(double? minimumCoverage)\nSets a number between 0 and 100 indicating the percentage of the index that must be covered by a query in order for the query to be reported as a success. \n- minimumCoverage: The desired minimum coverage.\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithSearchField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAppends to the list of field names to search for the specified search text.\n- lambdaExpression: The lambda expression representing the search field.\n```C#\n.WithSearchField(model =\u003e model.Property)\n```\n### IAutocompleteOptionsBuilder\\\u003cTModel\u003e WithSize(int? size)\nSets the number of items to retrieve. \n- size: The desired size value.\n\n\n\n\n\n## [IOrderedSearchOptionsBuilder](AzureSearchQueryBuilder/Builders/IOrderedSearchOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SearchOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### SearchOptions Build()\nBuild a [Azure.Search.Documents.SearchOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchOptions) object.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithFacet\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a proprty to the collection of fields to facet by.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithFacet(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithHighlightField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of field names used for hit highlights.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithHighlightField(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithIncludeTotalCount(bool includeTotalCount)\nSets the value indicating whether to fetch the total count of results.\n- includeTotalCount: The desired include total results count value.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithQueryType(QueryType queryType)\nSets a value indicating the query type.\n- queryType: The desired [Azure.Search.Documents.QueryType](https://docs.microsoft.com/en-us/dotnet/api/Azure.Search.Documents.QueryType).\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithScoringParameter(string scoringParameter)\nSets a value indicating the values for each parameter defined in a scoring function.\n- scoringParameter: The desired additional scoring parameter.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithScoringProfile(string scoringProfile)\nSets the name of a scoring profile to evaluate match scores for matching documents in order to sort the results.\n- scoringProfile: The desired scoring profile name.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithSearchMode(SearchMode searchMode)\nSets a value indicating whether any or all of the search terms must be matched in order to count the document as a match.\n- searchMode: The desired [Azure.Search.Documents.SearchMode](https://docs.microsoft.com/en-us/dotnet/api/Azure.Search.Documents.SearchMode).\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithSelect\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of fields to include in the result set.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithSelect(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithSkip(int? skip)\nSets the number of search results to skip.\n- skip: The desired skip value.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithThenBy\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for performing a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithThenBy(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithThenByDescending\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for performing a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithThenByDescending(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e Where(Expression\u003cBooleanLambdaDelegate\\\u003cTModel\u003e\u003e lambdaExpression)\nAdds a where clause to the filter expression.\n- lambdaExpression: The lambda expression used to generate a filter expression.\n```C#\n.Where(model =\u003e model.Property == value)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithHighlightPostTag(string highlightPostTag)\nSets the string tag that appends to search hits.\n- highlightPostTag: the desired tag.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithHighlightPreTag(string highlightPreTag)\nSets the string tag that prepends to search hits.\n- highlightPreTag: the desired tag.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithMinimumCoverage(double? minimumCoverage)\nSets a number between 0 and 100 indicating the percentage of the index that must be covered by a query in order for the query to be reported as a success. \n- minimumCoverage: The desired minimum coverage.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithSearchField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAppends to the list of field names to search for the specified search text.\n- lambdaExpression: The lambda expression representing the search field.\n```C#\n.WithSearchField(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithSize(int? size)\nSets the number of items to retrieve. \n- size: The desired size value.\n\n\n\n\n\n## [IOrderedSuggestOptionsBuilder](AzureSearchQueryBuilder/Builders/IOrderedSuggestOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SuggestOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.SuggestOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### SuggestOptions Build()\nBuild a [Azure.Search.Documents.SuggestOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.SuggestOptions) object.\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithSelect\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of fields to include in the result set.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithSelect(model =\u003e model.Property)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithThenBy\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for performing a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithThenBy(model =\u003e model.Property)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithThenByDescending\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for performing a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithThenByDescending(model =\u003e model.Property)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithUseFuzzyMatching(bool useFuzzyMatching)\nSets the use fuzzy matching value.\n- useFuzzyMatching: The desired fuzzy matching mode.\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e Where(Expression\u003cBooleanLambdaDelegate\\\u003cTModel\u003e\u003e lambdaExpression)\nAdds a where clause to the filter expression.\n- lambdaExpression: The lambda expression used to generate a filter expression.\n```C#\n.Where(model =\u003e model.Property == value)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithHighlightPostTag(string highlightPostTag)\nSets the string tag that appends to search hits.\n- highlightPostTag: the desired tag.\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithHighlightPreTag(string highlightPreTag)\nSets the string tag that prepends to search hits.\n- highlightPreTag: the desired tag.\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithMinimumCoverage(double? minimumCoverage)\nSets a number between 0 and 100 indicating the percentage of the index that must be covered by a query in order for the query to be reported as a success. \n- minimumCoverage: The desired minimum coverage.\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithSearchField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAppends to the list of field names to search for the specified search text.\n- lambdaExpression: The lambda expression representing the search field.\n```C#\n.WithSearchField(model =\u003e model.Property)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithSize(int? size)\nSets the number of items to retrieve. \n- size: The desired size value.\n\n\n\n\n\n## [ISearchOptionsBuilder](AzureSearchQueryBuilder/Builders/ISearchOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SearchOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### SearchOptions Build()\nBuild a [Azure.Search.Documents.SearchOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchOptions) object.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithFacet\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a proprty to the collection of fields to facet by.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithFacet(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithHighlightField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of field names used for hit highlights.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithHighlightField(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithIncludeTotalCount(bool includeTotalCount)\nSets the value indicating whether to fetch the total count of results.\n- includeTotalCount: The desired include total results count value.\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithOrderBy\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for sorting the elements of a sequence in ascending order using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithOrderBy(model =\u003e model.Property)\n```\n### IOrderedSearchOptionsBuilder\\\u003cTModel\u003e WithOrderByDescending\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for sorting the elements of a sequence in descending order using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithOrderByDescending(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithQueryType(QueryType queryType)\nSets a value indicating the query type.\n- queryType: The desired [Azure.Search.Documents.QueryType](https://docs.microsoft.com/en-us/dotnet/api/Azure.Search.Documents.QueryType).\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithScoringParameter(string scoringParameter)\nSets a value indicating the values for each parameter defined in a scoring function.\n- scoringParameter: The desired additional scoring parameter.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithScoringProfile(string scoringProfile)\nSets the name of a scoring profile to evaluate match scores for matching documents in order to sort the results.\n- scoringProfile: The desired scoring profile name.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithSearchMode(SearchMode searchMode)\nSets a value indicating whether any or all of the search terms must be matched in order to count the document as a match.\n- searchMode: The desired [Azure.Search.Documents.SearchMode](https://docs.microsoft.com/en-us/dotnet/api/Azure.Search.Documents.SearchMode).\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithSelect\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of fields to include in the result set.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithSelect(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithSkip(int? skip)\nSets the number of search results to skip.\n- skip: The desired skip value.rom each element.\n```C#\n.WithThenByDescending(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e Where(Expression\u003cBooleanLambdaDelegate\\\u003cTModel\u003e\u003e lambdaExpression)\nAdds a where clause to the filter expression.\n- lambdaExpression: The lambda expression used to generate a filter expression.\n```C#\n.Where(model =\u003e model.Property == value)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithHighlightPostTag(string highlightPostTag)\nSets the string tag that appends to search hits.\n- highlightPostTag: the desired tag.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithHighlightPreTag(string highlightPreTag)\nSets the string tag that prepends to search hits.\n- highlightPreTag: the desired tag.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithMinimumCoverage(double? minimumCoverage)\nSets a number between 0 and 100 indicating the percentage of the index that must be covered by a query in order for the query to be reported as a success. \n- minimumCoverage: The desired minimum coverage.\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithSearchField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAppends to the list of field names to search for the specified search text.\n- lambdaExpression: The lambda expression representing the search field.\n```C#\n.WithSearchField(model =\u003e model.Property)\n```\n### ISearchOptionsBuilder\\\u003cTModel\u003e WithSize(int? size)\nSets the number of items to retrieve. \n- size: The desired size value.\n\n\n\n\n\n## [ISuggestOptionsBuilder](AzureSearchQueryBuilder/Builders/ISuggestOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SuggestOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.SuggestOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### SuggestOptions Build()\nBuild a [Azure.Search.Documents.SuggestOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.SuggestOptions) object.\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithOrderBy\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for sorting the elements of a sequence in ascending order using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithOrderBy(model =\u003e model.Property)\n```\n### IOrderedSuggestOptionsBuilder\\\u003cTModel\u003e WithOrderByDescending\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nUses an expression for sorting the elements of a sequence in descending order using a specified comparer.\n- lambdaExpression: An expression to extract a property from each element.\n```C#\n.WithOrderByDescending(model =\u003e model.Property)\n```\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithSelect\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAdds a property to the collection of fields to include in the result set.\n- lambdaExpression: An expression to extract a property.\n```C#\n.WithSelect(model =\u003e model.Property)\n```\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithUseFuzzyMatching(bool useFuzzyMatching)\nSets the use fuzzy matching value.\n- useFuzzyMatching: The desired fuzzy matching mode.\n### ISuggestOptionsBuilder\\\u003cTModel\u003e Where(Expression\u003cBooleanLambdaDelegate\\\u003cTModel\u003e\u003e lambdaExpression)\nAdds a where clause to the filter expression.\n- lambdaExpression: The lambda expression used to generate a filter expression.\n```C#\n.Where(model =\u003e model.Property == value)\n```\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithHighlightPostTag(string highlightPostTag)\nSets the string tag that appends to search hits.\n- highlightPostTag: the desired tag.\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithHighlightPreTag(string highlightPreTag)\nSets the string tag that prepends to search hits.\n- highlightPreTag: the desired tag.\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithMinimumCoverage(double? minimumCoverage)\nSets a number between 0 and 100 indicating the percentage of the index that must be covered by a query in order for the query to be reported as a success. \n- minimumCoverage: The desired minimum coverage.\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithSearchField\\\u003cTProperty\u003e(Expression\u003cPropertyLambdaDelegate\u003cTModel, TProperty\u003e\u003e lambdaExpression)\nAppends to the list of field names to search for the specified search text.\n- lambdaExpression: The lambda expression representing the search field.\n```C#\n.WithSearchField(model =\u003e model.Property)\n```\n### ISuggestOptionsBuilder\\\u003cTModel\u003e WithSize(int? size)\nSets the number of items to retrieve. \n- size: The desired size value.\n\n\n\n\n\n## [SearchOptionsBuilder](AzureSearchQueryBuilder/Builders/SearchOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SearchOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### static ISearchOptionsBuilder\\\u003cTModel\u003e Create()\nCreate a new ISearchOptionsBuilder\\\u003cTModel\u003e.\n### Example using models from [How to use Azure Search from a .NET Application](https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk#how-the-net-sdk-handles-documents)\n```C#\nSearchOptionsBuilder\u003cHotel\u003e.Create()\n  .Where(hotel =\u003e hotel.HotelId == \"Some ID\" || hotel.HotelName == \"Some Name\")\n  .Where(hotel =\u003e hotel.ParkingIncluded == true)\n  .WithFacet(hotel =\u003e hotel.Address.City)\n  .WithFacet(hotel =\u003e hotel.Address.StateProvince)\n  .WithHighlightField(hotel =\u003e hotel.Category)\n  .WithHighlightField(hotel =\u003e hotel.Rating)\n  .WithHighlightPostTag(\"Post Tag\")\n  .WithHighlightPreTag(\"Pre Tag\")\n  .WithIncludeTotalCount(true)\n  .WithMinimumCoverage(0.75)\n  .WithOrderBy(hotel =\u003e hotel.HotelName)\n  .WithQueryType(QueryType.Full)\n  .WithScoringParameter(new ScoringParameter(\"First\", new string[] { \"one\", \"two\", }))\n  .WithScoringParameter(new ScoringParameter(\"Second\", new string[] { \"three\", \"four\", }))\n  .WithScoringProfile(\"Scoring Profile Name\")\n  .WithSearchField(hotel =\u003e hotel.HotelName)\n  .WithSearchField(hotel =\u003e hotel.Description)\n  .WithSearchMode(SearchMode.Any)\n  .WithSelect(hotel =\u003e hotel.HotelName)\n  .WithSelect(hotel =\u003e hotel.Address.Country)\n  .WithSkip(20)\n  .WithThenByDescending(hotel =\u003e hotel.LastRenovationDate)\n  .WithSize(10)\n  .Build();\n```\n| Property                 | Value                                                                                |\n| ------------------------ | ------------------------------------------------------------------------------------ |\n| Facets                   | Adress/City, Address/StateProvince                                                   |\n| Filter                   | ((HotelId eq 'Some ID') or (HotelName eq 'Some Name')) and (ParkingIncluded eq true) |\n| HighlightFields          | Category, Rating                                                                     |\n| HighlightPostTag         | Post Tag                                                                             |\n| HighlightPreTag          | Pre Tag                                                                              |\n| IncludeTotalCount        | True                                                                                 |\n| MinimumCoverage          | 0.75                                                                                 |\n| OrderBy                  | HotelName asc, LastRenovationDate desc                                               |\n| QueryType                | Full                                                                                 |\n| ScoringParameters        | First (one, two), Second (three, four)                                               |\n| ScoringProfile           | Scoring Profile Name                                                                 |\n| SearchFields             | HotelName, Description                                                               |\n| SearchMode               | Any                                                                                  |\n| Select                   | HotelName, Address/Country                                                           |\n| Skip                     | 20                                                                                   |\n| Size                      | 10                                                                                   |\n\n\n\n\n\n## [SuggestOptionsBuilder](AzureSearchQueryBuilder/Builders/SuggestOptionsBuilder.cs)\\\u003cTModel\u003e\nThe [Azure.Search.Documents.SuggestOptions](https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.SuggestOptions)\\\u003cTModel\u003e builder.\n\u003e TModel is the class the prepresents a document in the search index.\n### static ISuggestOptionsBuilder\\\u003cTModel\u003e Create()\nCreate a new ISuggestOptionsBuilder\\\u003cTModel\u003e.\n### Example using models from [How to use Azure Search from a .NET Application](https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk#how-the-net-sdk-handles-documents)\n```C#\nSuggestOptionsBuilder\u003cHotel\u003e.Create()\n  .WithHighlightPostTag(\"Post Tag\")\n  .WithHighlightPreTag(\"Pre Tag\")\n  .WithMinimumCoverage(0.75)\n  .WithOrderBy(hotel =\u003e hotel.HotelName)\n  .WithSearchField(hotel =\u003e hotel.HotelName)\n  .WithSearchField(hotel =\u003e hotel.Description)\n  .WithSelect(hotel =\u003e hotel.HotelName)\n  .WithSelect(hotel =\u003e hotel.Address.Country)\n  .WithThenByDescending(hotel =\u003e hotel.LastRenovationDate)\n  .WithSize(10)\n  .WithUseFuzzyMatching(true)\n  .Where(hotel =\u003e hotel.HotelId == \"Some ID\" || hotel.HotelName == \"Some Name\")\n  .Where(hotel =\u003e hotel.ParkingIncluded == true)\n  .Build();\n```\n| Property         | Value                                                                                |\n| ---------------- | ------------------------------------------------------------------------------------ |\n| Filter           | ((HotelId eq 'Some ID') or (HotelName eq 'Some Name')) and (ParkingIncluded eq true) |\n| HighlightPostTag | Post Tag                                                                             |\n| HighlightPreTag  | Pre Tag                                                                              |\n| MinimumCoverage  | 0.75                                                                                 |\n| OrderBy          | HotelName asc, LastRenovationDate desc                                               |\n| SearchFields     | HotelName, Description                                                               |\n| Select           | HotelName, Address/Country                                                           |\n| Size              | 10                                                                                   |\n| UseFuzzyMatching | True                                                                                 |\n\n\n\n\n\n## [SearchFns](AzureSearchQueryBuilder/Builders/SearchFns.cs)\nSearchFns provides access to search.in, search.ismatch, search.ismatchscoring, and search.score functions from the builder interfaces.\n```C#\nSuggestOptionsBuilder\u003cHotel\u003e.Create()\n  .WithOrderBy(hotel =\u003e hotel.HotelName)\n  .WithThenByBy(hotel =\u003e SearchFns.Score())\n  .Where(hotel =\u003e hotel.HotelId == \"Some ID\" || hotel.HotelName == \"Some Name\")\n  .Where(hotel =\u003e SearchFns.Score() \u003e= 0.5)\n  .Where(hotel =\u003e SearchFns.In(hotel.Name, \"One\", \"Two\", \"Three\"))\n  .Where(hotel =\u003e SearchFns.IsMatch(\"Hotel One\", hotel.Name, hotel.Description))\n  .Build();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fazure-search-query-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Fazure-search-query-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Fazure-search-query-builder/lists"}