Add pre-configurable filters to endpoint

Created on 28 September 2023, about 1 year ago
Updated 12 July 2024, 4 months ago

Problem/Motivation

In case the response of the endpoint should already have filtered results without client setting the facet or filter value, for example, to display only content of given type for any request, the filters should be defined in the back-office for the endpoint and then be applied during search query build.

Create UI to configure the filters (maybe in a similar way how views does it).

✨ Feature request
Status

Needs review

Version

1.0

Component

Admin User Interface

Created by

πŸ‡©πŸ‡ͺGermany a.dmitriiev

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

Merge Requests

Comments & Activities

  • Issue created by @a.dmitriiev
  • πŸ‡©πŸ‡ͺGermany breidert

    This would be nice to have. If you had 3 content types (page, news, event), the you could have 3 search endpoints with one index:

    • General Search (search all content types with a facet for the content types)
    • News Search (searching only content of type news)
    • Event Search (searching only content of type event)
  • Pipeline finished with Success
    11 months ago
    #65833
  • Pipeline finished with Success
    11 months ago
    Total: 160s
    #65860
  • Pipeline finished with Success
    11 months ago
    #67540
  • πŸ‡ΊπŸ‡ΈUnited States seantwalsh Eatontown, NJ

    Would definitely love this feature! How can I help move this forward?

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    I have already started adding the config schema for filters in the fork branch. The idea is to add some simplified version of Filters as in views on Endpoint edit page and then use the settings in the endpoint controller to apply the conditions.

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    a.dmitriiev β†’ changed the visibility of the branch 3390462-add-pre-configurable-filters to hidden.

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    a.dmitriiev β†’ changed the visibility of the branch 3390462-add-pre-configurable-filters to active.

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    I moved a bit further and created a Draft MR. At the moment the basic filtering was added, it is possible to add/edit/delete filter. The exposed feature is not ready yet and UI for setting complex values for filters like "BETWEEN", "IN", "NOT IN", ... is not there. At the moment it is just one textfield for value.

  • Pipeline finished with Failed
    8 months ago
    Total: 1165s
    #117602
  • Pipeline finished with Success
    8 months ago
    Total: 903s
    #117656
  • Pipeline finished with Skipped
    8 months ago
    #119203
  • Pipeline finished with Success
    8 months ago
    Total: 169s
    #125682
  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    Endpoint edit form now has the "Filters" section at the bottom where one can add pre-defined filters, that will be applied without any query parameters in the request to endpoint. Also, it is possible to add "Exposed" filters. At the moment there are only 3 types of filters: Numeric (for integer and decimal search api type), Date and Fallback (for all others including string)

    For backwards compatibility it is still possible to filter by any index field, if no filters are added to endpoint. If at least one filter is added, and it if it is not allowed to be exposed, adding query parameter to endpoint request for the field that corresponds to filter will not be working. Only if the filter allows to be exposed the query parameter will influence results.

  • Status changed to Needs review 4 months ago
Production build 0.71.5 2024