#Sort parser
#Introduction
$newQuery->sort('_score')->sort('name.keyword', 'asc');
$parser->parse('_score name:asc');
_score rating:desc name:asc
[
"_score",
{
"rating": "desc"
},
{
"name": "asc"
}
]
#Properties
$mappings = new Properties();
$parser = new SortParser($props);
$parser->parse('_score rating:desc name:asc');
[
"_score",
{
"rating": "desc"
},
{
- "name": "asc",
+ "name.keyword": "asc"
}
]
$blueprint = new Blueprint;
$blueprint->bool('active');
$blueprint->text('name')->keyword();
$blueprint->text('category');
$props = $blueprint();