Details
-
Bug
-
Resolution: Unresolved
-
High
-
2015.03
-
None
-
PHP 5.4.16
Description
When using SearchService's findContent() with the new implementation (EZP-23524) using field filters, the field filter "useAlwaysAvailable" defaults to false instead of true.
Steps to reproduce:
1. Ensure a installation without demo content with eng-GB as default language and fre-FR as secondary language;
2. On legacy admin, at "Home", create:
folder "Folder" in eng-GB
folder "FolderFR" in fre-FR
folder "FolderEN" in eng-GB
3. Use on a custom bundle the following code to perform a search query:
$query = new Query(); $query->filter = new Criterion\Field( "name", Criterion\Operator::CONTAINS, "Folder" ); $searchResult = $searchService->findContent( $query, array( "languages" => array( "fre-FR" ) ) ); /* Results */ foreach( $searchResult->searchHits as $searchHit ) { $output->writeln( $searchHit->valueObject->contentInfo->name ); }
and verify that you'll get only the following results:
FolderFR
whereas you should get instead:
Folder FolderFR FolderEN
since, by using
$useAlwaysAvailable=true
or simply omitting it from the array at:
findContent( $query, array( "languages" => array( "fre-FR" ) ) )
it should add the default language 'eng-GB' to the array of searchable languages and thus, retrieve results found on both fre-FR and eng-GB languages.
Attachments
Issue Links
- discovered while testing
-
EZP-23524 As a Developer I need support for field filters affecting queries in Legacy Search Engine
- Closed