'(Kinda solved) Solr search with special characters

I'm trying to make symbols in searches not relevant.

If we see the following field value has a "perr" Token at indexation, as well as the value in query.

Index content

Why isn't a query like this returning anything? (extra fields remove for brevety)

<lst name="params">
<str name="q">per-ro</str>
<str name="qt">ri_dismax_mixed_es</str>
<str name="indent">true</str>
<str name="wt">xml</str>
<str name="debugQuery">true</str>
<str name="_">1651060917537</str>
</lst>
...
<result name="response" numFound="0" start="0">
</result>
<lst name="debug">
    <lst name="queryBoosting">
       <str name="q">per#ro</str>
       <null name="match"/>
    </lst>
<str name="rawquerystring">per-ro</str>
<str name="querystring">per-ro</str>
<str name="parsedquery">(+DisjunctionMaxQuery((... | exactLoose_es_PRODUCTO_DESCRIPCION_DETALLADA_es_str:"per (ro perr)"^8.0 | ... </str>
<str name="parsedquery_toString">+(... | exactLoose_es_PRODUCTO_DESCRIPCION_DETALLADA_es_str:"per (ro perr)"^8.0 | ...</str>
 <lst name="explain"/>
 <str name="QParser">DisMaxQParser</str>

QT ri_dismax_mixed_es (extra fields remove for brevety)

   <requestHandler class="solr.SearchHandler" name="ri_dismax_mixed_es" >
    <lst name="defaults">

      
      <str name="facet.method">enum</str>

      <str name="defType">dismax</str>
      <str name="echoParams">explicit</str>
      <int name="rows">20</int>

      
      <float name="tie">0.1</float>

      
      <str name="qf">... exactLoose_es_PRODUCTO_DESCRIPCION_DETALLADA_es_str^8 ...</str>

      
      <str name="pf">... exactLoose_es_PRODUCTO_DESCRIPCION_DETALLADA_es_str^8 ...</str>

      <int name="ps">100</int>

      
      <str name="fl">...</str>

      
      <str name="mm">1</str>
      <str name="facet">true</str>
      <int name="facet.limit">-1</int>
      <int name="facet.mincount">1</int>
      <str name="sort">score desc</str>
      <str name="q.alt">*:*</str>
    </lst>
    <lst name="appends">
        <str name="facet.field">hierarchy_es_front</str>
        ...
    </lst>
    <arr name="last-components">
      <str>elevator_es</str>
    </arr>
  </requestHandler>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source