| @@ 1002-1028 (lines=27) @@ | ||
| 999 | ); |
|
| 1000 | } |
|
| 1001 | ||
| 1002 | public function testFieldFilterOr() |
|
| 1003 | { |
|
| 1004 | $this->assertSearchResults( |
|
| 1005 | [11, 69, 71, 72], |
|
| 1006 | $this->getContentSearchHandler()->findContent( |
|
| 1007 | new Query( |
|
| 1008 | [ |
|
| 1009 | 'filter' => new Criterion\LogicalOr( |
|
| 1010 | [ |
|
| 1011 | new Criterion\Field( |
|
| 1012 | 'name', |
|
| 1013 | Criterion\Operator::EQ, |
|
| 1014 | 'members' |
|
| 1015 | ), |
|
| 1016 | new Criterion\Field( |
|
| 1017 | 'price', |
|
| 1018 | Criterion\Operator::BETWEEN, |
|
| 1019 | [10000, 1000000] |
|
| 1020 | ), |
|
| 1021 | ] |
|
| 1022 | ), |
|
| 1023 | 'limit' => 10, |
|
| 1024 | ] |
|
| 1025 | ) |
|
| 1026 | ) |
|
| 1027 | ); |
|
| 1028 | } |
|
| 1029 | ||
| 1030 | public function testFullTextFilter() |
|
| 1031 | { |
|
| @@ 1478-1504 (lines=27) @@ | ||
| 1475 | ); |
|
| 1476 | } |
|
| 1477 | ||
| 1478 | public function testFieldFilterOr() |
|
| 1479 | { |
|
| 1480 | $this->assertSearchResults( |
|
| 1481 | [12, 71, 73, 74], |
|
| 1482 | $this->getContentSearchHandler()->findLocations( |
|
| 1483 | new LocationQuery( |
|
| 1484 | [ |
|
| 1485 | 'filter' => new Criterion\LogicalOr( |
|
| 1486 | [ |
|
| 1487 | new Criterion\Field( |
|
| 1488 | 'name', |
|
| 1489 | Criterion\Operator::EQ, |
|
| 1490 | 'members' |
|
| 1491 | ), |
|
| 1492 | new Criterion\Field( |
|
| 1493 | 'price', |
|
| 1494 | Criterion\Operator::BETWEEN, |
|
| 1495 | [10000, 1000000] |
|
| 1496 | ), |
|
| 1497 | ] |
|
| 1498 | ), |
|
| 1499 | 'limit' => 10, |
|
| 1500 | ] |
|
| 1501 | ) |
|
| 1502 | ) |
|
| 1503 | ); |
|
| 1504 | } |
|
| 1505 | ||
| 1506 | public function testIsMainLocationFilter() |
|
| 1507 | { |
|