azure - what is the supported Model for multi-level Document search? -


i have created few documents in documentdb , looking how search multi-level or parent child objects in single document using azure search services.

can 1 me out/any links.

azure search requires documents flattened, need create query in documentdb this. started, there document here, give information on how model these more complex data types in azure search.

also, prefer flattening right in documentdb. this, user defined functions (udf) great way this. here example allows pass in array , take items of type "child" , pass array.

function converttoarray (data, child) {      var resultarray = [];     (var = 0; < data.length; i++)     {         resultarray.push(data[i][child]);      }      return resultarray; } 

then within documentdb, query this:

select  c.username,  udf.converttoarray(c.addresses, "city") city c 

so if c.addresses looked this:

[     {       "city": "toronto",       "country": "canada"     },     {       "city": "seattle",       "country": "usa"     }   ] 

the output udf be:

["toronto", "seattle"] 

which can loaded azure search in collection datatype.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -