You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running into an issue with URI searches not returning expected results after upgrading from 0.90.9 to 1.4.1
The issue is that subfields are not returned when specified with "&fields". I have confirmed that the data is there by doing the same search without the &fields specifications and get the Meter.geometry.coordinates. I am not seeing anything in the release notes for 1.4.1 that indicate any change in URI search functionality.
Hoping someone has run into this already and can tell me how to specify subfields for results sets other than the &fields method or how to get the &fields method to work again in 1.4.1+
If you want to retrieve the actual coordinates, you could set the coordinates field to store:true, in which case it'll return an array of indexed values:
PUT test
{
"mappings": {
"test": {
"properties": {
"loc": {
"type": "geo_point",
"store": true
}
}
}
}
}
PUT test/test/1
{
"loc": {"lat":1, "lon": 2}
}
PUT test/test/2
{
"loc": [1,2]
}
GET /test/test/_search?fields=loc
Running into an issue with URI searches not returning expected results after upgrading from 0.90.9 to 1.4.1
The issue is that subfields are not returned when specified with "&fields". I have confirmed that the data is there by doing the same search without the &fields specifications and get the Meter.geometry.coordinates. I am not seeing anything in the release notes for 1.4.1 that indicate any change in URI search functionality.
Hoping someone has run into this already and can tell me how to specify subfields for results sets other than the &fields method or how to get the &fields method to work again in 1.4.1+
Thanks in advance.
0.90.9 URI Search:
https://contoso.com/customer/v1/tapsandmeters?q=Meter.servicePointId:0865540026&fields=Meter.geometry.coordinates
0.90.9 URI Search Results:
{
took: 2,
timed_out: false,
_shards:
{
total: 3,
successful: 3,
failed: 0
},
hits:
{
total: 1,
max_score: 11.723421,
hits:
[
{
_index: "customer12345",
_type: "TapAndMeter",
_id: "086554009008655400270865540026",
_score: 11.723421,
fields:
{
Meter.geometry.coordinates:
{
lon: -104.959796299,
lat: 39.7702803882
}
}
}
]
}
}
1.4.1 URI Search:
https://newercontoso.comcustomer/v1/tapsandmeters?q=Meter.servicePointId:0865540026&fields=Meter.geometry.coordinates
1.4.1 URI Search Results:
{
took: 5,
timed_out: false,
_shards:
{
total: 3,
successful: 3,
failed: 0
},
hits:
{
total: 1,
max_score: 11.856463,
hits:
[
{
_index: "customer12345",
_type: "TapAndMeter",
_id: "086554009008655400270865540026",
_score: 11.856463
}
]
}
}
The text was updated successfully, but these errors were encountered: