RickT
May 16, 2024, 3:17pm
1
hi all !
i'm trying to filter data with Lucene. I wish filtered the data having 2 fields exists.
I tried with this code but it doesn't work :
{
"query": {
"bool" : {
"must": {
"exists": {
"field": "total",
"field": "machine"
}
}
}
}
}
Is it possible to do this ?
Thanks.
dadoonet
(David Pilato)
May 16, 2024, 3:39pm
2
I think this should be something like:
{
"query": {
"bool" : {
"must": [{
"exists": {
"field": "total"
}
},{
"exists": {
"field": "machine"
}
}]
}
}
}
RickT
May 16, 2024, 4:35pm
3
Thank you David,
In fact, this generate an AND request. I want simply an OR type request
RickT
May 17, 2024, 7:00am
5
Argh! Of course ! That works correctly now
Sorry and thank you a lot.