使用 VScode Azure 认知服务扩展一次在索引中插入多个文档。 (Azure 搜索服务)
Insert multiple documents in index at once, using VScode Azure Cognitive Services extension. (Azure Search Service)
我想一次将多个 Documents 插入到 Azure 搜索服务 中的 Index 中.我正在使用 VScode 扩展 Azure 认知服务 来插入,如他们的文档中所述。
Link 官方文档:
https://docs.microsoft.com/en-us/azure/search/search-get-started-vs-code
官方文档提到了插入单个JSON的方法,即右键单击文档->创建新文档。
我尝试使用上述方法插入多个用逗号分隔的 JSON 文档(下面附有片段),我得到了预期的错误:
Unexpected token, in JSON at position 915
我尝试在单个文档中插入多个文档创建新文档:
{
"HotelId": "4",
"HotelName": "Sublime Cliff Hotel",
"Description": "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
"Description_fr": null,
"Category": "Boutique",
"Tags": [
"concierge",
"view",
"24-hour front desk service"
],
"ParkingIncluded": true,
"LastRenovationDate": "1960-02-06T00:00:00Z",
"Rating": 4.6,
"Address": {
"StreetAddress": "7400 San Pedro Ave",
"City": "San Antonio",
"StateProvince": "TX",
"PostalCode": "78216",
"Country": "USA"
}
},
{
"HotelId": "5",
"HotelName": "Sublime Cliff Hotel",
"Description": "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
"Description_fr": null,
"Category": "Boutique",
"Tags": [
"concierge",
"view",
"24-hour front desk service"
],
"ParkingIncluded": true,
"LastRenovationDate": "1960-02-06T00:00:00Z",
"Rating": 4.6,
"Address": {
"StreetAddress": "7400 San Pedro Ave",
"City": "San Antonio",
"StateProvince": "TX",
"PostalCode": "78216",
"Country": "USA"
}
}
有谁知道使用 VScode 在索引中一次插入多个文档的方法吗?
您可以使用 Postman 通过创建一个 POST 请求并在正文中传递 JSON 来做同样的事情。这适用于 Index.
中的单个和多个文档条目
Link 官方文档-
https://docs.microsoft.com/en-us/azure/search/search-get-started-rest
我想一次将多个 Documents 插入到 Azure 搜索服务 中的 Index 中.我正在使用 VScode 扩展 Azure 认知服务 来插入,如他们的文档中所述。
Link 官方文档: https://docs.microsoft.com/en-us/azure/search/search-get-started-vs-code
官方文档提到了插入单个JSON的方法,即右键单击文档->创建新文档。
我尝试使用上述方法插入多个用逗号分隔的 JSON 文档(下面附有片段),我得到了预期的错误:
Unexpected token, in JSON at position 915
我尝试在单个文档中插入多个文档创建新文档:
{
"HotelId": "4",
"HotelName": "Sublime Cliff Hotel",
"Description": "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
"Description_fr": null,
"Category": "Boutique",
"Tags": [
"concierge",
"view",
"24-hour front desk service"
],
"ParkingIncluded": true,
"LastRenovationDate": "1960-02-06T00:00:00Z",
"Rating": 4.6,
"Address": {
"StreetAddress": "7400 San Pedro Ave",
"City": "San Antonio",
"StateProvince": "TX",
"PostalCode": "78216",
"Country": "USA"
}
},
{
"HotelId": "5",
"HotelName": "Sublime Cliff Hotel",
"Description": "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
"Description_fr": null,
"Category": "Boutique",
"Tags": [
"concierge",
"view",
"24-hour front desk service"
],
"ParkingIncluded": true,
"LastRenovationDate": "1960-02-06T00:00:00Z",
"Rating": 4.6,
"Address": {
"StreetAddress": "7400 San Pedro Ave",
"City": "San Antonio",
"StateProvince": "TX",
"PostalCode": "78216",
"Country": "USA"
}
}
有谁知道使用 VScode 在索引中一次插入多个文档的方法吗?
您可以使用 Postman 通过创建一个 POST 请求并在正文中传递 JSON 来做同样的事情。这适用于 Index.
中的单个和多个文档条目Link 官方文档- https://docs.microsoft.com/en-us/azure/search/search-get-started-rest