Relevance impacted by range clause


(Adrien B) #1

Hi,

When I try this query

"query":{
    "bool": {
        "must": [
            {"range": {
                "date":{
                "lt": "2000-01-01"
                }
            }},
            {"terms": {
                "directors": ["Ridley Scott","Billy Wilder"]
            }}
        ]
    }
}

My score is impacted by the date range query. Ok I understand that I can make a filter to avoid this. But my question is how the relevance is computed for the range query. If I try to make a query with only one range clause like below, all my documents have the same _score (1).

{
    "query":
    {
        "range" : {
            "date" : {
                "lte" : "2001-01-01"
            }
        }
    }
}

Can someone explain me how and why the score is impacted by my range clause in my first query?

Thanks


(system) #2