0

In Solr 9.8.1 the following query does not find any results.

research_project_project_id_intS:(69772 69787 71838)

  "response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[]
  }}

If I search for each item alone, all three are found.

research_project_project_id_intS:69772

  "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[
      {
        "research_project_project_id_intS":69772,

research_project_project_id_intS:69787

  "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[
      {
        "research_project_project_id_intS":69787,

research_project_project_id_intS:71838

 "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[
      {
        "research_project_project_id_intS":71838,

The field is declared as an integer

research_project_project_id_intS
Field: research_project_project_id_intS
Dynamic Field: *_intS
Type: integer

Does anyone have any idea where the error could lie?

2
  • What query parser are you using / how is configured your search handler ? There are 2 things I think that can cause this behavior : 1) The q.op parameter, it could be that your search handler has it set to "AND" as default, in which case you can change it or override it in the query. 2) The (e)dismax parser has a mm parameter, which specifies the minimum number of clauses that should match, in the same way you can either change the default in the search handler definition or override it in the query (nb. if q.op is specified as "AND", mm defaults to 100%). Commented Jul 27 at 12:45
  • Thank you very much for your comment. It has helped. Solr uses: <str name="defType">edismax</str> Commented Jul 28 at 11:08

1 Answer 1

1

We use Solr in the TYPO3 environment. The following query parser is configured:

    <str name="defType">edismax</str>  
    <str name="mm">2<-35%</str>  

For this type of search to work, the following must be configured in TypoScript:

  plugin.tx_solr {  
    search {  
      query {  
        minimumMatch = 1  
      }  
    }  
  }

Explanation: query.minimumMatch Sets the minimum match mm query parameter. By default the mm query parameter is set in solrconfig.xml as 2<-35%. This means that for queries with less than three words they all must match the searched fields of a document. For queries with three or more words at least 65% of them must match rounded up.

Please consult the link to the Solr wiki for a more detailed description of the mm syntax.

https://docs.typo3.org/p/apache-solr-for-typo3/solr/13.0/en-us/Configuration/Reference/TxSolrSearch.html#query-minimummatch

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.