TechBubbles Microsoft Technology BLOG

AZURE Search Service overview – Part 2

This post explains filtering and scoring Search Service Results. Part 1 post on azure search service can be read here.Filters uses OData expression for searching the documents. The sample filter using postman as follows

Filtering results

The following ODATA filter operators that you can use filtering data in Search Service

eq , ne, gt, lt, ge, le  – for comparison operations

and , or , not – for logical operations

You can use Any and All operators to search data in collections. example “Any” operator returns true when any string in the collection is matched. “All”  operator returns true when every string in the collection is matched.

Creating Scoring Results

Azure search returns more relevant results from index using score. Higher the score the more relevant to the document. AZURE Search uses TF-IDF (Term Frequency – Inverse Document Frequency) algorithm to score the documents.

You need to get search index definition to create scoring profile

    "scoringProfiles": [
        {   "name": "NickName1",
            "text":{
            "weights": {
            "NickName1":4
                        }    
                   }
       }
        ]

The above code tells which field to boost and by how much weight. Greater the value for weight higher in search results relevance. You can specify multiple field names in weights section as coma separated to include in scoring. Each searchable field has a default weight value 1.

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud