Different result per language

Created on 6 July 2024, 7 months ago
Updated 19 September 2024, 4 months ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 8.11.2
  • Drupal Core version: 10.2.7
  • Search API version:1.35
  • Search API Solr version:4.3.4
  • Configured Solr Connector:

Issue

When i search for code PMD05663 in different language i get different result.

If i search PMD05663 in English i get only one result.

if i search PMD05663 in Italian i get PMD05663 as first result of many others.

Why different behavior?
Steps to reproduce

Add italian language
Create entity
Add 2 field text not transatable (field_one and field_two)
Create solr index
Add field_one and field_two
Setup fulltext "edgestring"
Create a view with fulltext search filter

💬 Support request
Status

Closed: works as designed

Version

4.3

Component

Code

Created by

🇮🇹Italy trickfun

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

Comments & Activities

  • Issue created by @trickfun
  • 🇩🇪Germany mkalkbrenner 🇩🇪

    Use search_api_solr_devel and/or the analyzer (part of search_api_solr_admin) to see what is going on.
    You could also post the output here.

  • 🇮🇹Italy trickfun

    Hi mkalkbrenner,
    this is my output

    English search

    Index: default_global_index
    Keys: 'PMD05663'
    Parsed keys: array (
        '#conjunction' => 'AND',
        0 => 'PMD05663',
      )
    Searched fields: brand, field_codici_alias, machine_model, machine_type, rendered_item, sku, title, zone
    Searched languages: en
    Conditions:
      status = 1
    Sorting: search_api_relevance DESC
    Options: array (
        'search_api_view' => 'object (Drupal\\views\\ViewExecutable)',
        'search_api_included_languages' => 
        array (
          0 => 'en',
        ),
      )

    Solr request rawData

    omitHeader=false&TZ=Europe%2FRome&echoParams=all&wt=json&json.nl=flat&q=%7B%21boost+b%3Dboost_document%7D++%28tm_X3b_en_brand%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_brand%3A%28%2B%22PMD05663%22%29%5E5+tocedgestringm_X3b_en_field_codici_alias%3A%28%2B%22PMD05663%22%29%5E21+tocedgestringm_X3b_und_field_codici_alias%3A%28%2B%22PMD05663%22%29%5E21+tm_X3b_en_machine_model%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_machine_model%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_en_machine_type%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_machine_type%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_en_rendered_item%3A%28%2B%22PMD05663%22%29%5E1+tm_X3b_und_rendered_item%3A%28%2B%22PMD05663%22%29%5E1+tocedgestringm_X3b_en_sku%3A%28%2B%22PMD05663%22%29%5E21+tocedgestringm_X3b_und_sku%3A%28%2B%22PMD05663%22%29%5E21+tm_X3b_en_title%3A%28%2B%22PMD05663%22%29%5E13+tm_X3b_und_title%3A%28%2B%22PMD05663%22%29%5E13+tm_X3b_en_zone%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_zone%3A%28%2B%22PMD05663%22%29%5E5%29&start=0&rows=20&fl=ss_search_api_id%2Css_search_api_language%2Cscore%2Chash&sort=score+desc&fq=bs_status%3A%22true%22&fq=%2Bindex_id%3Adefault_global_index&fq=ss_search_api_language%3A%28%22en%22+%22und%22%29&debugQuery=true&debug.explain.structured=true&facet.field=%7B%21key%3Ditm_field_attribute_3_ref+ex%3Dfacet%3Afield_attribute_3_ref%7Ditm_field_attribute_3_ref&facet.field=%7B%21key%3Ditm_field_attribute_2_ref+ex%3Dfacet%3Afield_attribute_2_ref%7Ditm_field_attribute_2_ref&facet.field=%7B%21key%3Ditm_field_brand_ref+ex%3Dfacet%3Afield_brand_ref%7Ditm_field_brand_ref&facet.field=%7B%21key%3Ditm_field_attribute_4_ref+ex%3Dfacet%3Afield_attribute_4_ref%7Ditm_field_attribute_4_ref&f.itm_field_attribute_3_ref.facet.limit=-1&f.itm_field_attribute_3_ref.facet.missing=false&f.itm_field_attribute_2_ref.facet.limit=-1&f.itm_field_attribute_2_ref.facet.missing=false&f.itm_field_brand_ref.facet.limit=-1&f.itm_field_brand_ref.facet.missing=false&f.itm_field_attribute_4_ref.facet.limit=-1&f.itm_field_attribute_4_ref.facet.missing=false&facet=true&facet.sort=count&facet.limit=10&facet.mincount=1&facet.missing=false

    Italian search

    Index: default_global_index
    Keys: 'PMD05663'
    Parsed keys: array (
        '#conjunction' => 'AND',
        0 => 'PMD05663',
      )
    Searched fields: brand, field_codici_alias, machine_model, machine_type, rendered_item, sku, title, zone
    Searched languages: it
    Conditions:
      status = 1
    Sorting: search_api_relevance DESC
    Options: array (
        'search_api_view' => 'object (Drupal\\views\\ViewExecutable)',
        'search_api_included_languages' => 
        array (
          0 => 'it',
        ),
      )

    Solr request rawData

    omitHeader=false&TZ=Europe%2FRome&echoParams=all&wt=json&json.nl=flat&q=%7B%21boost+b%3Dboost_document%7D++%28tm_X3b_it_brand%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_brand%3A%28%2B%22PMD05663%22%29%5E5+tocedgestringm_X3b_it_field_codici_alias%3A%28%2B%22PMD05663%22%29%5E21+tocedgestringm_X3b_und_field_codici_alias%3A%28%2B%22PMD05663%22%29%5E21+tm_X3b_it_machine_model%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_machine_model%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_it_machine_type%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_machine_type%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_it_rendered_item%3A%28%2B%22PMD05663%22%29%5E1+tm_X3b_und_rendered_item%3A%28%2B%22PMD05663%22%29%5E1+tocedgestringm_X3b_it_sku%3A%28%2B%22PMD05663%22%29%5E21+tocedgestringm_X3b_und_sku%3A%28%2B%22PMD05663%22%29%5E21+tm_X3b_it_title%3A%28%2B%22PMD05663%22%29%5E13+tm_X3b_und_title%3A%28%2B%22PMD05663%22%29%5E13+tm_X3b_it_zone%3A%28%2B%22PMD05663%22%29%5E5+tm_X3b_und_zone%3A%28%2B%22PMD05663%22%29%5E5%29&start=0&rows=20&fl=ss_search_api_id%2Css_search_api_language%2Cscore%2Chash&sort=score+desc&fq=bs_status%3A%22true%22&fq=%2Bindex_id%3Adefault_global_index&fq=ss_search_api_language%3A%28%22it%22+%22und%22%29&debugQuery=true&debug.explain.structured=true&facet.field=%7B%21key%3Ditm_field_attribute_3_ref+ex%3Dfacet%3Afield_attribute_3_ref%7Ditm_field_attribute_3_ref&facet.field=%7B%21key%3Ditm_field_attribute_2_ref+ex%3Dfacet%3Afield_attribute_2_ref%7Ditm_field_attribute_2_ref&facet.field=%7B%21key%3Ditm_field_brand_ref+ex%3Dfacet%3Afield_brand_ref%7Ditm_field_brand_ref&facet.field=%7B%21key%3Ditm_field_attribute_4_ref+ex%3Dfacet%3Afield_attribute_4_ref%7Ditm_field_attribute_4_ref&f.itm_field_attribute_3_ref.facet.limit=-1&f.itm_field_attribute_3_ref.facet.missing=false&f.itm_field_attribute_2_ref.facet.limit=-1&f.itm_field_attribute_2_ref.facet.missing=false&f.itm_field_brand_ref.facet.limit=-1&f.itm_field_brand_ref.facet.missing=false&f.itm_field_attribute_4_ref.facet.limit=-1&f.itm_field_attribute_4_ref.facet.missing=false&facet=true&facet.sort=count&facet.limit=10&facet.mincount=1&facet.missing=false

    There are no difference.

  • 🇩🇪Germany mkalkbrenner 🇩🇪

    With search_api_solr_devel, you also get detailed output of Solr answers. These will give us more information.
    You could also add the score debugging to your views output.

  • Status changed to Closed: works as designed 4 months ago
  • 🇩🇪Germany mkalkbrenner 🇩🇪

    no further feedback

Production build 0.71.5 2024