Allison_A
(Allison A.)
September 7, 2012, 6:56pm
1
hi, i'm using the following query:
var json = new {
query = new {
query_string = new {
fields = new string[] {
"BusinessName^1.0", "Teaser^0.2",
"ReviewText^0.7",
"CategoryMajor^2.0",
"CategoryMinor^0.5",
"State^0.5", "City^0.5"
},
query = "restaurants",
use_dis_max = true
}
},
sort = new {
_geo_distance = new {
Location = "40.748470,-73.939180",
order = "asc",
unit = "mi"
}
},
from = 0,
size = 5
};
my results have _score = null
but if i remove the sort, the _score comes back
is this a bug?
Allison
--
Ivan
(Ivan Brusic)
September 7, 2012, 6:59pm
2
Be sure to set track_scores to true:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
--
Ivan
On Fri, Sep 7, 2012 at 11:56 AM, Allison A.
allisonandrews@feranassociates.com wrote:
hi, i'm using the following query:
var json = new {
query = new {
query_string = new {
fields = new string[] {
"BusinessName^1.0", "Teaser^0.2",
"ReviewText^0.7",
"CategoryMajor^2.0",
"CategoryMinor^0.5",
"State^0.5", "City^0.5"
},
query = "restaurants",
use_dis_max = true
}
},
sort = new {
_geo_distance = new {
Location = "40.748470,-73.939180",
order = "asc",
unit = "mi"
}
},
from = 0,
size = 5
};
my results have _score = null
but if i remove the sort, the _score comes back
is this a bug?
Allison
--
--