question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Azure Search Working with Complex Collections

See original GitHub issue

Our data structure is similar to HotelId 1 example in the link https://docs.microsoft.com/en-us/azure/search/search-howto-complex-data-types

Our requirement is as follows:

Input: City = New York, StateProvince = NY, BaseRate = $100

Select fields: HotelId, HotelName, Description, Tags, Address, Rooms

Filter: Only rooms where BaseRate is less than or equal to Input rate and Address City and State matches input values. In this example, it should only select the first room from Rooms, not all Rooms.

Desired output:

{
"HotelId": "1",
"HotelName": "Secret Point Motel",
"Description": "Ideally located on the main commercial artery of the city in the heart of New York.",
"Tags": ["Free wifi", "on-site parking", "indoor pool", "continental breakfast"]
"Address": {
    "StreetAddress": "677 5th Ave",
    "City": "New York",
    "StateProvince": "NY"
  },
"Rooms": [
    {
      "Description": "Budget Room, 1 Queen Bed (Cityside)",
      "RoomNumber": 1105,
      "BaseRate": 96.99,
    }
  ]
}

Any help or direction on how to write a query for this or any pointers would be welcome.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brjohnstmsftcommented, Apr 12, 2021

@ssghoda The service doesn’t support this scenario today. Please create an item on our User Voice page to help us prioritize.

1reaction
Mohit-Chakrabortycommented, Apr 9, 2021

Thanks for the additional context. That is very helpful. It looks like you want a REST API query for the service and not .NET client library code. Also, it may be how the service is designed/operates.

I am tagging additional folks to help you with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Model complex data types - Azure Cognitive Search
In Azure Cognitive Search, complex types are modeled using complex fields. ... If you're working with an existing fields collection, ...
Read more >
Azure Search Working with Complex Collections
From what I know there is no way to remove certain complex types from a record in a response. The query to do...
Read more >
Understanding OData collection filters - Azure Cognitive ...
... how OData collection filters work in Azure Cognitive Search queries, ... multiple filter criteria over a collection of complex objects, ...
Read more >
Leveraging complex data to build advanced search ...
By Liam Cavanagh Principal Program Manager, Azure Search ... not only can you map this data to a complex structure, but the search...
Read more >
[FEATURE REQ] Azure Search Working with Complex ...
[FEATURE REQ] Azure Search Working with Complex Collections #23569 ... In SQL query or Cosmos Db query, I can get the desired result...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found