Commit 3d3e1e39 authored by lphuberdeau's avatar lphuberdeau

[FIX] Prefix search would not work with multiple terms in elasticsearch

parent fa9625b1
......@@ -113,9 +113,9 @@ class Search_Elastic_QueryBuilder
);
} elseif ($node instanceof Initial) {
return array(
'prefix' => array(
'text_phrase_prefix' => array(
$node->getField() => array(
"value" => $this->getTerm($node),
"query" => $this->getTerm($node),
"boost" => $node->getWeight(),
),
),
......
......@@ -230,9 +230,9 @@ class Search_Elastic_QueryBuilderTest extends PHPUnit_Framework_TestCase
$this->assertEquals(
array(
"prefix" => array(
"text_phrase_prefix" => array(
"title" => array(
"value" => "hello",
"query" => "hello",
"boost" => 1.5,
),
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment