| @@ 996-1022 (lines=27) @@ | ||
| 993 | ); |
|
| 994 | } |
|
| 995 | ||
| 996 | public function testFieldFilterOr() |
|
| 997 | { |
|
| 998 | $this->assertSearchResults( |
|
| 999 | array(11, 69, 71, 72), |
|
| 1000 | $this->getContentSearchHandler()->findContent( |
|
| 1001 | new Query( |
|
| 1002 | array( |
|
| 1003 | 'filter' => new Criterion\LogicalOr( |
|
| 1004 | array( |
|
| 1005 | new Criterion\Field( |
|
| 1006 | 'name', |
|
| 1007 | Criterion\Operator::EQ, |
|
| 1008 | 'members' |
|
| 1009 | ), |
|
| 1010 | new Criterion\Field( |
|
| 1011 | 'price', |
|
| 1012 | Criterion\Operator::BETWEEN, |
|
| 1013 | array(10000, 1000000) |
|
| 1014 | ), |
|
| 1015 | ) |
|
| 1016 | ), |
|
| 1017 | 'limit' => 10, |
|
| 1018 | ) |
|
| 1019 | ) |
|
| 1020 | ) |
|
| 1021 | ); |
|
| 1022 | } |
|
| 1023 | ||
| 1024 | public function testFullTextFilter() |
|
| 1025 | { |
|
| @@ 1472-1498 (lines=27) @@ | ||
| 1469 | ); |
|
| 1470 | } |
|
| 1471 | ||
| 1472 | public function testFieldFilterOr() |
|
| 1473 | { |
|
| 1474 | $this->assertSearchResults( |
|
| 1475 | array(12, 71, 73, 74), |
|
| 1476 | $this->getContentSearchHandler()->findLocations( |
|
| 1477 | new LocationQuery( |
|
| 1478 | array( |
|
| 1479 | 'filter' => new Criterion\LogicalOr( |
|
| 1480 | array( |
|
| 1481 | new Criterion\Field( |
|
| 1482 | 'name', |
|
| 1483 | Criterion\Operator::EQ, |
|
| 1484 | 'members' |
|
| 1485 | ), |
|
| 1486 | new Criterion\Field( |
|
| 1487 | 'price', |
|
| 1488 | Criterion\Operator::BETWEEN, |
|
| 1489 | array(10000, 1000000) |
|
| 1490 | ), |
|
| 1491 | ) |
|
| 1492 | ), |
|
| 1493 | 'limit' => 10, |
|
| 1494 | ) |
|
| 1495 | ) |
|
| 1496 | ) |
|
| 1497 | ); |
|
| 1498 | } |
|
| 1499 | ||
| 1500 | public function testIsMainLocationFilter() |
|
| 1501 | { |
|