I have two requests simple which work. But together it does not work anymore. I use elasticsearch 1.4 and drupal 7.
This query works and results it's ok :
$searchParams = [
'body' => [
"from"=> 0,
"size"=> 30000,
'query' => [
'match'=> [
'title' => [
'query' => "vivre et comprendre le cancer",
'operator' => "and"
]
]
]
]
];
This second query works and results it's ok :
$searchParams = [
'body' => [
"from"=> 0,
"size"=> 30000,
'query' => [
'filtered'=> [
'filter' => [
'bool' => [
'must' => [
'terms' => [
'field_support' => [105,106,1896,1897]
]
]
]
]
]
]
]
];
BUT together i have an error : nested: ElasticsearchParseException[Expected field name but got START_OBJECT \"filtered\"];
$searchParams = [
'body' => [
"from"=> 0,
"size"=> 30000,
'query' => [
'match'=> [
'title' => [
'query' => "vivre et comprendre le cancer",
'operator' => "and"
]
],
'filtered'=> [
'filter' => [
'bool' => [
'must' => [
'terms' => [
'field_support' => [105,106,1896,1897]
]
]
]
]
]
]
]
];
Can somebody help me ? Thanks