From e2dd0a54837b65ec21b9576c65cfeb0a2f4eed47 Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Wed, 30 Nov 2016 16:46:03 +0100 Subject: [PATCH 1/3] Remove apache Solr from supported list [skip ci] --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 46e8562d..3cd69cb0 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ as separate packages. Building your own condition processor is also possible. * [Doctrine2 DBAL](https://github.com/rollerworks/search-doctrine-dbal) * [Doctrine2 ORM](https://github.com/rollerworks/search-doctrine-orm) -* Apache Solr (coming soon) * [Elasticsearch](https://github.com/rollerworks/search-elasticsearch) (coming soon) Requirements From d4e9a63960c8149c5a8c5e53fd3919146dc0caeb Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Thu, 1 Dec 2016 12:02:55 +0100 Subject: [PATCH 2/3] Fix ValuesBag::addExcludedValue() breaks new API The internalvalue was not extracted for getExcludedSimpleValues() --- src/ValuesBag.php | 2 +- tests/ValuesBagTest.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ValuesBag.php b/src/ValuesBag.php index 64c82661..4945f562 100644 --- a/src/ValuesBag.php +++ b/src/ValuesBag.php @@ -131,7 +131,7 @@ public function addExcludedValue(SingleValue $value) throw new ValuesStructureIsLocked(); } - $this->simpleExcludedValues[] = $value; + $this->simpleExcludedValues[] = $value->getValue(); $this->simpleExcludedValuesObjects[] = $value; ++$this->valuesCount; diff --git a/tests/ValuesBagTest.php b/tests/ValuesBagTest.php index 4c24b928..116ec438 100644 --- a/tests/ValuesBagTest.php +++ b/tests/ValuesBagTest.php @@ -28,7 +28,7 @@ public function it_allows_adding_simple_values() { $valuesBag = new ValuesBag(); $valuesBag->addSimpleValue('value'); - $valuesBag->addSimpleValue('value2'); + $valuesBag->addSingleValue(new SingleValue('value2')); $this->assertTrue($valuesBag->hasSimpleValues()); $this->assertEquals(['value', 'value2'], $valuesBag->getSimpleValues()); @@ -36,6 +36,7 @@ public function it_allows_adding_simple_values() // To be removed in 2.0 $this->assertTrue($valuesBag->hasSingleValues()); $this->assertEquals([new SingleValue('value'), new SingleValue('value2')], $valuesBag->getSingleValues()); + $this->assertEquals(['value', 'value2'], $valuesBag->getSimpleValues()); } /** @@ -105,7 +106,7 @@ public function it_allows_adding_excluded_simple_values() { $valuesBag = new ValuesBag(); $valuesBag->addExcludedSimpleValue('value'); - $valuesBag->addExcludedSimpleValue('value2'); + $valuesBag->addExcludedValue(new SingleValue('value2')); $this->assertTrue($valuesBag->hasExcludedSimpleValues()); $this->assertEquals(['value', 'value2'], $valuesBag->getExcludedSimpleValues()); From a425adbaf2149995c049162a4c87c088d6de5e1b Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Thu, 26 Jan 2017 10:31:10 +0100 Subject: [PATCH 3/3] [Doc] Fix wrong example in FilterQuery syntax Field values are started with `:` not `=` --- doc/input/filter_query.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/input/filter_query.rst b/doc/input/filter_query.rst index 7653dac1..572f81b9 100644 --- a/doc/input/filter_query.rst +++ b/doc/input/filter_query.rst @@ -235,25 +235,25 @@ to mark the group as logical AND. .. code-block:: php - &(field1=values; field2=values); + &(field1: values; field2: values); To change a group and make it OR'ed (at least one field must give a positive match), prefix the group with an ``*`` character. .. code-block:: php - *(field1=values; field2=values); + *(field1: values; field2: values); If you want to head-group (the condition itself) OR'ed or AND (default) use ``*`` or ``&`` as the first character in the condition. .. code-block:: php - *field1=values; field2=values; + *field1: values; field2: values; .. code-block:: php - &field1=values; field2=values; + &field1: values; field2: values; .. caution::