vgross
(vgross)
May 28, 2012, 9:26am
1
Hi ,
I try to choose the "boost" on my different field when i make a simple
search query my result is not what i'm expect
Whit this simple mapping, for exemple :
$mapping->setProperties(array(
'libelle' => array('type' => 'string', 'include_in_all' => TRUE),
'description' => array('type' => 'string', 'include_in_all' => TRUE)
));
I would like to have a better "boost" on my field 'libelle'
'query' => array(
'text' => array(
'libelle' => array(
'query' => $_POST['searchQuery'],
'boost' => 9
)
),
'text' => array(
'description' => array(
'query' => $_POST['searchQuery'],
'boost' => 0.2
)
)
)
If anyone can help me...
Thanx
dadoonet
(David Pilato)
May 28, 2012, 9:40am
2
I've answered on the french mailing list that I use this :
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
David
Le 28 mai 2012 à 11:26, Vincent GROSS vince.gross@gmail.com a écrit :
Hi ,
I try to choose the "boost" on my different field when i make a simple search query my result is not what i'm expect
Whit this simple mapping, for exemple :
$mapping->setProperties(array(
'libelle' => array('type' => 'string', 'include_in_all' => TRUE),
'description' => array('type' => 'string', 'include_in_all' => TRUE)
));
I would like to have a better "boost" on my field 'libelle'
'query' => array(
'text' => array(
'libelle' => array(
'query' => $_POST['searchQuery'],
'boost' => 9
)
),
'text' => array(
'description' => array(
'query' => $_POST['searchQuery'],
'boost' => 0.2
)
)
)
If anyone can help me...
Thanx
kimchy
(Shay Banon)
May 29, 2012, 7:25pm
3
It might be that the structure of the query you send is wrong, you need to
wrap a compound query (two text queries) in a bool query (probably you want
should elements).
On Mon, May 28, 2012 at 11:26 AM, Vincent GROSS vince.gross@gmail.com wrote:
Hi ,
I try to choose the "boost" on my different field when i make a simple
search query my result is not what i'm expect
Whit this simple mapping, for exemple :
$mapping->setProperties(array(
'libelle' => array('type' => 'string', 'include_in_all' => TRUE),
'description' => array('type' => 'string', 'include_in_all' => TRUE)
));
I would like to have a better "boost" on my field 'libelle'
'query' => array(
'text' => array(
'libelle' => array(
'query' => $_POST['searchQuery'],
'boost' => 9
)
),
'text' => array(
'description' => array(
'query' => $_POST['searchQuery'],
'boost' => 0.2
)
)
)
If anyone can help me...
Thanx