Step 1: I have created a General Purpose Blob Storage (block blob) and a container (access policy set to "container") in it. Also added 19 documents (pdf, xlsx, docx, ppt, png, jpg, txt) and all documents are displayed in azure portal --> Blob Storage Container.
Step 2: Created Azure search (basic tier) and followed this article and performed the following.
Step 3: Created a datasource
POST https://anysearch.search.windows.net/datasources?api-version=2015-02-28-Preview
Content-Type: application/json
api-key: adminkey
{
"name" : "blob-datasource",
"type" : "azureblob",
"credentials" : { "connectionString" : "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=givenkey==" },
"container" : { "name" : "containername"}
}
Step 4: Created an index
POST https://anysearch.search.windows.net/indexes?api-version=2015-02-28-Preview
Content-Type: application/json
api-key: adminkey
{
"name" : "my-target-index",
"fields": [
{ "name": "id", "type": "Edm.String", "key": true, "searchable": false },
{ "name": "content", "type": "Edm.String", "searchable": true, "filterable": false, "sortable": false, "facetable": false }
]
}
Step 5: Created an indexer.
POST https://anyearch.search.windows.net/indexers?api-version=2015-02-28-Preview
Content-Type: application/json
api-key: adminkey
{
"name" : "blob-indexer",
"dataSourceName" : "blob-datasource",
"targetIndexName" : "my-target-index",
"schedule" : { "interval" : "PT5M" }
}
Step 6: Run index stats and got the below result - DOCUMENTCOUNT = 0
GET https://anysearch.search.windows.net/indexes/my-target-index/stats?api-version=2015-02-28-Preview
api-key: [admin key]
{
"@odata.context": "https://mydocsearch.search.windows.net/$metadata#Microsoft.Azure.Search.V2015_02_28_Preview.IndexStatistics",
"documentCount": 0,
"storageSize": 1728
}
Step 7: Searched for the word "process" and got the below result
GET https://anysearch.search.windows.net/indexes/my-target-index/docs?api-version=2015-02-28&search=process
{
"@odata.context": "https://mydocsearch.search.windows.net/indexes('my-target-index')/$metadata#docs(id,content)",
"value": []
}
What went wrong here ? Why the document count is 0 ? Why the word "process" or any other search word is not returning any results ?
Please help.
Thanks
Bhanu.