This pr removes the AbstractSearchService and refactors the existing AssetSearchService to comply with the updated SearchServiceInterface. As part of this, it adds a new method 'performSearch' inside the AssetSearchService. Also, this introduces a new SearchProvider and SearchProviderInterface to create different types of searches. An exception has been added for invalid page and page size in PaginatedSearchTrait. Corresponding tests have been added to ensure the accuracy of changes.
Usage of Search Provider:
public function testingAction(SearchProviderInterface $searchProvider, AssetSearchServiceInterface $assetSearchService)
{
$assetSearch = $searchProvider->createAssetSearch()
->addModifier(new ParentIdFilter(1))
->addModifier(new OrderByFullPath())
->setPageSize(50)
->setPage(1);
$searchResult = $assetSearchService->search($assetSearch);
}
Contact Qodana team
Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com)
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
Changes in this pull request
Resolves #
Additional info
This pr removes the AbstractSearchService and refactors the existing AssetSearchService to comply with the updated SearchServiceInterface. As part of this, it adds a new method 'performSearch' inside the AssetSearchService. Also, this introduces a new SearchProvider and SearchProviderInterface to create different types of searches. An exception has been added for invalid page and page size in PaginatedSearchTrait. Corresponding tests have been added to ensure the accuracy of changes.
Usage of Search Provider: