SudevPK
(Sudev P K)
June 28, 2019, 9:37am
1
Sample records need to be selected
{
"_index" : "sample",
"_type" : "_doc",
"_id" : "1213",
"_version" : 2,
"_seq_no" : 2227876,
"_primary_term" : 1,
"found" : true,
"_source" : {
"id" : 1213,
"price" : "-7284869.0",
"updatedDate" : "2019-06-26T12:40:16.6197147-05:00"
}
}
SudevPK
(Sudev P K)
June 28, 2019, 9:44am
2
Not working
GET sample/_search
{
"query": {
"bool": {
"must": [
{
"prefix": {
"price": "-"
}
}
]
}
}
}
dadoonet
(David Pilato)
June 28, 2019, 9:56am
3
It depends on the mapping used for this field. With a keyword
type it should work.
1 Like
SudevPK
(Sudev P K)
July 1, 2019, 6:43am
4
Is there is any other way to filter(with - ) the records ,if the mapping of the field(price) is text
dadoonet
(David Pilato)
July 1, 2019, 8:16am
5
I don't think so as - has probably be removed at index time.
Check the analyzer API to see how your text has been indexed behind the scene.
1 Like
system
(system)
Closed
July 29, 2019, 8:18am
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.