0
votes

I recently developed an index on Azure. I have the following index structure:

{"name": "my_index",
    "fields":
    [
        {"name": "id", "type": "Edm.String", "filterable": true, "key": true, "searchable": true, "sortable": true, "facetable": false},
        {"name": "metadata_storage_path", "type": "Edm.String", "searchable": false, "filterable": false, "retrievable": true, "sortable": false, "facetable": false},
        {"name": "Name", "type": "Edm.String", "searchable": true, "retrievable": true, "filterable": true, "sortable": false, "facetable": true, "analyzer": "en.microsoft"},
        {"name": "Description", "type": "Edm.String", "searchable": true, "retrievable": true, "filterable": false, "sortable": false, "facetable": false, "analyzer": "en.microsoft"},
        {"name": "Content", "type": "Edm.String", "searchable": true, "retrievable": true, "filterable": false, "sortable": false, "facetable": false, "analyzer": "en.microsoft"}
}

When I try to search an entire phrase, for example, "cloud platform", I get some top results without any mention of "cloud platform" which is a bit strange. When I then look at the search.score, even the top results have very low score like 0.07. However, I could see the phrases appearing in the documents and I expect to have enough documents containing the phrase.

Does anyone know why that might be the case? Is it because I used the wrong analyzer?

Any potential tests I can try would also be hugely appreciated.

1
try using the StandardAnalyzer rather than en.microsoftThiago Custodio
Tried to update the 'analyzer' value but was given the error: Existing field cannot be changed. However, based on this link: docs.microsoft.com/en-us/rest/api/searchservice/update-index, I should be able to change analyzer no? Thanks again.eskimojin
no, you'll need to drop and recreate itThiago Custodio

1 Answers

0
votes

are you querying using REST or SDK, in both cases an example request will help to understand your issue better. If I were doing this using REST it will be like this

https://<yourserviceName>.search.windows.net/indexes/<yourIndexName>/docs?api-version=2020-06-30&search=*&%24filter=description%20eq%20'cloud platform'

Note to make sure the exact match happens I am using filter instead of search.