| @@ 916-942 (lines=27) @@ | ||
| 913 | ); |
|
| 914 | } |
|
| 915 | ||
| 916 | public function testFieldFilterOr() |
|
| 917 | { |
|
| 918 | $this->assertSearchResults( |
|
| 919 | [11, 186, 187], |
|
| 920 | $this->getContentSearchHandler()->findContent( |
|
| 921 | new Query( |
|
| 922 | [ |
|
| 923 | 'filter' => new Criterion\LogicalOr( |
|
| 924 | [ |
|
| 925 | new Criterion\Field( |
|
| 926 | 'name', |
|
| 927 | Criterion\Operator::EQ, |
|
| 928 | 'members' |
|
| 929 | ), |
|
| 930 | new Criterion\Field( |
|
| 931 | 'publication_date', |
|
| 932 | Criterion\Operator::BETWEEN, |
|
| 933 | [1190000000, 1200000000] |
|
| 934 | ), |
|
| 935 | ] |
|
| 936 | ), |
|
| 937 | 'limit' => 10, |
|
| 938 | ] |
|
| 939 | ) |
|
| 940 | ) |
|
| 941 | ); |
|
| 942 | } |
|
| 943 | ||
| 944 | public function testFullTextFilter() |
|
| 945 | { |
|
| @@ 1397-1423 (lines=27) @@ | ||
| 1394 | ); |
|
| 1395 | } |
|
| 1396 | ||
| 1397 | public function testFieldFilterOr() |
|
| 1398 | { |
|
| 1399 | $this->assertSearchResults( |
|
| 1400 | [12, 188, 189], |
|
| 1401 | $this->getContentSearchHandler()->findLocations( |
|
| 1402 | new LocationQuery( |
|
| 1403 | [ |
|
| 1404 | 'filter' => new Criterion\LogicalOr( |
|
| 1405 | [ |
|
| 1406 | new Criterion\Field( |
|
| 1407 | 'name', |
|
| 1408 | Criterion\Operator::EQ, |
|
| 1409 | 'members' |
|
| 1410 | ), |
|
| 1411 | new Criterion\Field( |
|
| 1412 | 'publication_date', |
|
| 1413 | Criterion\Operator::BETWEEN, |
|
| 1414 | [1190000000, 1200000000] |
|
| 1415 | ), |
|
| 1416 | ] |
|
| 1417 | ), |
|
| 1418 | 'limit' => 10, |
|
| 1419 | ] |
|
| 1420 | ) |
|
| 1421 | ) |
|
| 1422 | ); |
|
| 1423 | } |
|
| 1424 | ||
| 1425 | public function testIsMainLocationFilter() |
|
| 1426 | { |
|