Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from Microsoft.Azure.Search v10 to Azure.Search.Documents v11 #122254

Open
vishalwakad opened this issue May 6, 2024 · 2 comments
Open

Comments

@vishalwakad
Copy link

vishalwakad commented May 6, 2024

According to https://learn.microsoft.com/en-us/azure/search/search-dotnet-sdk-migration-version-11#UpgradeSteps document I have made the changes for Conflict search up to step 8 . Currently I am working on updating classes, methods, and properties to use the APIs of the new library and finding equivalent APIs.

I want to upgrade the following code of version Microsft.Azure.Search v10

var scoringPars = new List();
var tennantConfig = await configManager.GetConfiguation(applicationSettings.UniqueOrganizationName);
scoringPars.Add(new ScoringParameter("owners", new[] { currentUser.SystemUserID }));

var parameters = new SearchParameters
{
IncludeTotalResultCount = true,
QueryType = QueryType.Full,
SearchMode = SearchMode.All,
ScoringParameters = scoringPars,
};

The changes that I made while upgrading to Azure.Search.Documents is

var scoringPars = new List();
var tennantConfig = await configManager.GetConfiguation(applicationSettings.UniqueOrganizationName);
scoringPars.Add(new TagScoringParameters("owners"));

var parameters = new SearchOptions
{
SearchMode = SearchMode.All,
IncludeTotalCount = true,
QueryType = SearchQueryType.Full,
ScoringParameters = scoringPars
};

I am getting error in following line

 ScoringParameters = scoringPars

Also I would like to know that is there any document or any ink available that can help us find equivalent APIS of Microsoft.Azure.Search in to Azure.Search.Documents.

Or if someone has done it earlier migrated from Microsoft.Azure.Search in to Azure.Search.Documents. Is there any standard way to reduce time and manual effort to upgarde apis which is quite time consuming as just adding new referenced wont help. We have to find matching apis and classes etc from the documents and modify them in code.

Tasks

No tasks being tracked yet.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@TPavanBalaji
Copy link

@vishalwakad
Thank you for bringing this to our attention.
I've delegated this to content author, who will review it and offer their insightful opinions.

@HeidiSteen
Copy link
Contributor

Hi @vishalwakad, I'm sorry about the frustration on upgrade, I agree it's time consuming. The only information we have on upgrade is in the document you found. I looked for C# scoring profiles in various samples, and it looks like we could use some more. I'll add it to the backlog. In the meantime, I found a partial example in the SDK tests: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs It's not what you're looking for, but the test cases call all of the APIs and sometimes it's better than nothing.

@mattgotteiner, can you look at the scoringParameters definition and see if anything jumps out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants