I have these two queries
First
GET propertywebsites3/_search
{
"_source": "city",
"query": {
"bool": {
"filter": {
"term": {
"city.raw": "Dubai"
}
}
}
}
}
Seond
GET propertywebsites3/_search
{
"_source": "city",
"query": {
"filtered": {
"filter": {
"term": {
"city.raw": "Dubai"
}
}
}
}
}
The first one gives 0 for all the scores, I see that in this page https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html it is written that if you use the filter clause in a bool clause, all matching documents will have 0 in the score,
and the second query gives 1 to the score of all the documents.
first of all why not both of them either 0 or 1. second aren't they supposed to do they same? which is filtering all the documents that its city is "Dubai" ?
thanks