community-features icon indicating copy to clipboard operation
community-features copied to clipboard

Allow setting returned fields in search_request.xml

Open aapokiiso opened this issue 5 years ago • 2 comments

Summary (*)

It's not possible to customize fields returned by search engines (for example Elasticsearch) in search_request.xml.

Examples (*)

In the case of Elasticsearch, Magento\Elasticsearch\SearchAdapter\Query\Builder forces the returned fields to be ['_id', '_score']. This is OK in the case of product search, because you can fetch the remaining data through the product repository using the returned product IDs. But in simpler search cases, it would be nice to return the fields directly from the search index.

Proposed solution

I could provide a PR for this, but is there an explicit reason this is not possible at the moment? Maybe some incompatibility issue between search engines, which prevents this being part of the search_request.xml abstraction?

aapokiiso avatar May 15 '19 05:05 aapokiiso

Hi @aapokiiso. Thank you for your report. To help us process this issue please make sure that you provided the following information:

  • [x] Summary of the issue
  • [ ] Information on your environment
  • [x] Steps to reproduce
  • [x] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@aapokiiso do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [x] yes
  • [ ] no

m2-assistant[bot] avatar May 15 '19 05:05 m2-assistant[bot]

Hello @aapokiiso

Thank you for feedback and your proposal!

Based on the description and label feature request the issue has been transferred to Magento Feature Request public repo.

sdzhepa avatar Jul 12 '19 20:07 sdzhepa