Add compatibility with JSON:API

Created on 14 August 2023, over 1 year ago
Updated 24 August 2023, about 1 year ago

Problem/Motivation

Currently the response returned by the module is in JSON format, so any possible reverse engineering to extract the referenced entities is lost.

It would be interesting if the response returned was in JSON:API format, so it would be possible to perform includes and extract the referenced entities.

Steps to reproduce

N/A

Proposed resolution

Maybe it would be interesting to integrate how the jsonapi_search_api module works, since the functionality between both is quite similar, being the biggest difference the integration with facets and autocomplete.

Remaining tasks

To be defined...

User interface changes

To be defined...

API changes

To be defined...

Data model changes

To be defined...

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇪🇸Spain dcimorra 🇪🇸 Spain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dcimorra
  • 🇩🇪Germany a.dmitriiev

    This will conflict with the main idea of this module, to be as simple as possible and benefit from returning the result as fast as possible without doing any additional entity loads from the database. Most of the time the results will come directly from the search server response without additional changes. So maybe it is better idea to help jsonapi_search_api to have facets (I have already seen, that there is some work done) and autocomplete integration

  • 🇩🇪Germany a.dmitriiev

    There is an event SearchApiEndpointResultsAlter called for each search result item that can be used to alter the output in the way that is needed and also add more fields, etc. At the moment the event is missing the current request variable, but this can be added. Actually it makes sense to have it in alter event.

  • Status changed to Closed: won't fix about 1 year ago
  • 🇩🇪Germany a.dmitriiev

    Closing this issue, because it will not be implemented in this module.

Production build 0.71.5 2024