Search API date range filter is not working

Created on 18 May 2022, over 2 years ago
Updated 21 May 2024, 7 months ago

In the search API date range filter is not working with the date field. While saving the search API view it is giving the error - "Query type range doesn't exist. in Drupal\facets\Entity\Facet->pickQueryType()". In the search index while adding the date field with type date range facing this issue.

💬 Support request
Status

Fixed

Version

2.7

Component

Code

Created by

🇮🇳India rohit sankhla

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇺Russia _cosmos_ Izhevsk, Russia

    I faced with the same issue on Drupal 10.
    Why it was closed?

    Drupal\facets\Exception\InvalidQueryTypeException: Query type range doesn't exist. in Drupal\facets\Entity\Facet->pickQueryType() (line 545 of /app/web/modules/contrib/facets/src/Entity/Facet.php).

  • Still encountering this issue while selecting the price field to use the facet to sort the products via a price range slider. I am on D10, when I opened another bug report, it said detected spam, why was this issue closed?

  • 🇷🇺Russia DD 85

    In order to get rid of the error
    Drupal\facets\Exception\InvalidQueryTypeException: Query type range doesn't exist. in Drupal\facets\Entity\Facet->pickQueryType() (line 545 of \modules\facets\src\Entity\Facet.php).
    You need to set the field type to Integer on the page /admin/config/search/search-api/index/default_index/fields. If the Price field is configured.

    My Range slider appears, but as soon as I touch it, it disappears along with the search results. No errors appear in the log after disappearance.

    I still have a question. Why, after enabling the widget, the Range slider is automatically enabled and the “Ensure that only one result can be displayed” setting becomes disabled?

    D10

Production build 0.71.5 2024