I have a file in blob storage folder/new/data.json
It contains json array.
[
{
"name": "a",
"data": {
"1":"something1",
"2":"something2"
}
},
{
"name": "b",
"data": {
"1":"something1",
"2":"something2"
}
}
]
my datasource body :
{
"name" : "datasource",
"type" : "azureblob",
"credentials" : { "connectionString" : "MyStorageConnStrning" },
"container" : { "name" : "mycontaner", "query" : "folder/new" }
}
my index body:
{
"name" : "index",
"fields": [
{ "name": "id", "type": "Edm.String", "key": true, "searchable": false },
{ "name": "name", "type": "Edm.String", "searchable": true, "filterable": false, "sortable": true, "facetable": true},
{ "name": "data", "type": "Edm.String", "searchable": false}
]
}
indexer body:
{
"name" : "indexer",
"dataSourceName" : "datasource",
"targetIndexName" : "index",
"parameters" : { "configuration" : { "parsingMode" : "jsonArray" } }
}
when created i can search for a
and b
and get result.
now i have modified folder/new/data.json
to
[
{
"name": "aa",
"data": {
"1":"something1",
"2":"something2"
}
}
]
just running the indexer only overwrites
{
"name": "a",
"data": {
"1":"something1",
"2":"something2"
}
}
but
{
"name": "b",
"data": {
"1":"something1",
"2":"something2"
}
}
still remains. Meaning b
is still searchable.
What can i do so the b
gets removed?
More preciously What to do when data-source file is changed and index data need to change accordingly? Removed data from the data-source needs to get removed from index and new data in data-source needs get indexed.