irfanh94
(Irfan Hodzic)
November 8, 2019, 9:06am
1
Hey folks,
I have this mapping for vehicles:
"vehicles" : {
"type": "text"
}
And documents inside, are like:
"vehicles" : [
"triumph daytona 750 749 1992",
"triumph trident 750 2018"
]
My question is, how I can make search query to search for document that contains exactly vehicle: triumph daytona 750 1992 ?
dadoonet
(David Pilato)
November 8, 2019, 9:47am
2
irfanh94
(Irfan Hodzic)
November 8, 2019, 10:06am
3
Hey David,
I am running query:
'match' => [
'vehicles' => [
'query' => "triumph daytona 750 1992",
'boost' => 3,
'operator' => 'and',
'minimum_should_match' => '100%'
]
]
But I still get, documents without exact this vehicle but similar, like: triumph daytona 650 2001
irfanh94
(Irfan Hodzic)
November 8, 2019, 10:30am
4
Actually, this query works perfect, I had a bug in other OR statement which is not in this match.
system
(system)
Closed
December 6, 2019, 10:30am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.