Selected Facet value not passed to SOLR URI.

Created on 18 December 2023, 11 months ago
Updated 9 February 2024, 9 months ago

Problem/Motivation

It seems like selected values of facets placed via BEF are not being sent to the SOLR URI.

I have setup a search api index using Solr as a backend and index multilingual content.
Created a view based on the indexed, which only returns the titles of the indexed document.
Full text search set on the title and body values.
Ajax not enabled, BEF is being used and exposed filters not exposed in a block. Very basic setup.

My full text search is working but facets are ignored.
I am using Facets 3, configure them as BEF and setting the widget to links in the view BEF seetings.
Returned results are never filtered based on the selected facet.

However, if I create a search_api page, facets work there.

Can anyone confirm this issue?

Steps to reproduce

core 10.1.7
search_api 8.x-1.31
search_api_solr 4.3.1
select2 8.x-1.15+1-dev
better_exposed_filters 6.0.2+3-dev
facets 3.0.0-beta1+17-dev with facets_exposed_filters enabled

My facet is called mandate, which is an indexed TID value.
When i select the facet and submit, it goest to the following url: search-page-no-ajax?facet_mandate%5B1%5D=164
However, that is not present at all in the url passed to Solr:

  "Solr URI" => "http://solr:8983/solr/default/select?omitHeader=false&TZ=America%2FToronto&echoParams=all&wt=json&json.nl=flat&q=%7B%21boost+b%3Dboost_document%7D++%2A%3A%2A&start=0&rows=10&fl=ss_search_api_id%2Css_search_api_language%2Cscore%2Chash%2Csm_language_with_fallback&sort=score+desc%2Cds_field_published_date+desc&fq=%2Bindex_id%3Asite_search&fq=ss_search_api_language%3A%28%22en%22+%22und%22%29&debugQuery=true&debug.explain.structured=true&facet.field=%7B%21key%3Ditm_field_mandate%7Ditm_field_mandate&f.itm_field_mandate.facet.limit=-1&f.itm_field_mandate.facet.missing=false&facet=true&facet.sort=count&facet.limit=10&facet.mincount=1&facet.missing=false"
πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Menthos

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

Comments & Activities

  • Issue created by @Menthos
  • Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "f" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /app/vendor/symfony/http-kernel/HttpKernel.php).

    I am able to index the contents but not able to apply filters.
    Solr version: 8.x
    Drupal Core version:10.1.7
    Search API version: 8.x-1.31
    Search API Solr version: 4.3.1
    Configured Solr Connector: 8.11.2

    I have already created an issue in solr. πŸ› Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "f" contains a non-scalar value. Closed: duplicate .
    Do help if you know anything about this.

  • πŸ‡¨πŸ‡¦Canada Menthos

    Can you try with Facet 3 to see if works? I see no error on my end, just the facet not being applied.

  • πŸ‡¨πŸ‡¦Canada Menthos

    I just tested it again on a fresh drupal instance, with only the module listed installed and still the same problem. I haven't installed any patch as its kind of hard to follow which are required currently to be honest.

  • πŸ‡ΊπŸ‡ΈUnited States BenStallings

    I tried both the beta and most recent dev version of Facets 3, and I'm still getting the error. Before upgrading, my facets actually worked but filters threw the error as specified above (I'm posting here because MKalkbrenner seemed so sure in the search_api_solr ticket that it was not a Solr issue but a Facets issue). However, after upgrading, the facets also don't work! So I'm going back to version 2.

  • πŸ‡¨πŸ‡¦Canada Menthos

    @BenStallings On my end, I ended up using Facets 2 and facets blocks and was able to get it to work properly. Are you getting basically the same error?

  • Status changed to Closed: outdated 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States BenStallings

    @marc.mantha I found and fixed this issue in Smart Date module at https://www.drupal.org/project/smart_date/issues/3414404 πŸ› BadRequestHttpException: input value contains a non-scalar value Active .

  • πŸ‡¨πŸ‡¦Canada Menthos

    @BenStallings Thanks i will definitely go and have a look. Currently for me switching to Facets 2 fixed the issue however.

Production build 0.71.5 2024