Home > OS >  What does this elasticsearch query mean?
What does this elasticsearch query mean?

Time:02-11

I want to find best movie/webseries from past 6 months to now and it should have good rating also.

POST sample-movie-2022.02.08/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "gauss": {
            "rating": {
              "origin": "10",
              "scale": "1"
            }
          }
        },
        {
          "gauss": {
            "release_date": {
              "origin": "now",
              "scale": "180d"
            }
          }
        }
      ]
    }
  }
}

The query gives different score when i change rating scale like 1,7,8.I actually don't know what does it mean in rating but i understood origin and scaling in relase_date

CodePudding user response:

You're using a enter image description here

CodePudding user response:

"max_score" : 0.9999709,
    "hits" : [
      {
        "_index" : "sample-movie-2022.02.10",
        "_type" : "_doc",
        "_id" : "EQCa4n4BEUv284Njth7K",
        "_score" : 0.9999709,
        "_source" : {
          "title" : "Krish 3",
          "rating":" 10"

As you've said rating with 10 will score 1 Why the score is not 1 and how it is calculated is there any formula ?

  • Related