azure-samples / azure-search-dotnet-samples Goto Github PK
View Code? Open in Web Editor NEWAzure Search .NET sample code
License: MIT License
Azure Search .NET sample code
License: MIT License
The following line of code is causing a build error:
SemanticSettings semanticSettings = new SemanticSettings();
This came from Quickstart: semantic ranking - Azure AI Search | Microsoft Learn
I was able to follow the tutorial but when I copied the code into my web app it would not compile. Any idea why? I’ve attached the file I’m editing as well as the build log file. Thanks in advance for your help.
I get changing the type of an existing data source is not supported when trying to merge data from multiple sources when deleting a few rooms to test/see what happens when a hotel does not have a room associated with it
How about an example of updating an existing document? The behaviour for this seems to have changed quite a bit from 10 to 11.
In file appsettings.json used name: SearchServiceName
https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/create-first-app/v11/1-basic-search-page/FirstAzureSearchApp/appsettings.json
but in function InitSearch
used name SearchServiceUri
In the project multiple-data-sources/v11
fields are mapped on line 145
but variable map
is not used,
I think there should be some code like this (line 155)
SearchIndexer blobIndexer = new SearchIndexer(
name: "hotel-rooms-blob-indexer",
dataSourceName: blobDataSource.Name,
targetIndexName: indexName)
{
Parameters = parameters,
FieldMappings = map,
Schedule = new IndexingSchedule(TimeSpan.FromDays(1))
};
While deploying Static web app and function , it did not show me below prompt
Select the location of your Azure Function code
Hence it did not deploy Azure Function
We are trying to create the index from cosmosDb.
Our collection data format -
[
{
"parent_name": "XYX-YXY",
"parent_id": 123456,
"childName": "abcd"
"parent_image": "https://www.google.com/1.jpg",
"_rid": "ZBQxAL3VfK5vDwAAAAAAAA==",
"_ts": 1599155970
},
{
"parent_name": "XYX-YXY",
"parent_id": 123456,
"childName": "abcd"
"parent_image": "https://www.google.com/1.jpg",
"_rid": "ZBQxAL3VfK5vDwAAAAAAAA==",
"_ts": 1599155970
},
{
"parent_name": "EDC-YXY",
"parent_id": 123456,
"childName": "abcde"
"parent_image": "https://www.google.com/1.jpg",
"_rid": "ZBQxAL3VfK5vDwAAAAAAAA==",
"_ts": 1599155970
},
{
"parent_name": "EDC-YXY",
"parent_id": 123456,
"childName": "abcd"
"parent_image": "https://www.google.com/1.jpg",
"_rid": "ZBQxAL3VfK5vDwAAAAAAAA==",
"_ts": 1599155970
}
]
Our goal to get the Distict records by parent_id
Our Query : SELECT DISTINCT (c.parent_id), c.parent_name FROM c WHERE c._ts > @highwatermark
While trying to create the data source getting below exception
{ "error": { "code": "", "message": "Error with data source: Query is invalid. Error: 'Distict query requires a matching order by in order to return a continuation token.\r\nIf you would like to serve this query through continuation tokens, then please rewrite the query in the form 'SELECT DISTINCT VALUE c.blah FROM c ORDER BY c.blah' and please make sure that there is a range index on 'c.blah'.' Please adjust your data source definition in order to proceed." } }
And then we tried adding the order by but still facing the issue
Query : SELECT DISTINCT (c.parent_id), c.parent_name FROM c WHERE c._ts > @highwatermark ORDER BY c.parent_id
Need suggestions to create the azure search index in these situations.
Thanks,
Sreekanth - Ecolab
Really looking for some getting started samples.
Thanks,
Therese
The MS documentation says :
If your index has more than 100,000 documents, this sample, as written, will not work. This is because the REST API $skip feature, that is used for paging, has a 100K document limit. However, you can work around this limitation by adding code to iterate over, and filter on, a facet with less that 100K documents per facet value.
Can someone provide an example on how I would implement this loop to iterate through an index that has more than 100K docs?
For https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/master/index-backup-restore
The tags for the configuration setup are not correct -- should be (from code):
**SourceSearchClient** = new SearchServiceClient(SourceSearchServiceName, new SearchCredentials(SourceAdminKey));
**SourceIndexClient** = SourceSearchClient.Indexes.GetClient(SourceIndexName);
**TargetSearchClient** = new SearchServiceClient(TargetSearchServiceName, new SearchCredentials(TargetAdminKey));
**TargetIndexClient** = TargetSearchClient.Indexes.GetClient(TargetIndexName);
This is related to the NumberedPaging app. It is developed in Asp.Net core 2.1.
The routing is different in the more current .net core frameworks: Looks something like this - app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
It creates the url for each page, but does not fire the event, so if you have gotten this to work, would you mind sharing. Thanks!
How about an example of updating an existing document partially?
Thank you
none of the below filters are working
$filter=Address/City eq 'San Antonio'
$filter=Address/StreetAddress eq '677 5th Ave'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.