Add option to use direct queries with AND operator

Created on 2 November 2023, over 1 year ago

Setup

  • Solr version: 8.11.2
  • Drupal Core version: 10.1.6
  • Search API version: 8.x-1.30
  • Search API Solr version: 4.3.0
  • Configured Solr Connector: Standard

Issue

I set the parse mode to direct query in order to be able to use Solr Boolean Operators. However, I still want the default operator to be AND.
When adding AND to the select-Handler in the Solr configuration, the search stops working and gives no results anymore.

Feature request
Status

Active

Version

4.3

Component

Code

Created by

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

Comments & Activities

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

    The query builder only works with "OR". And this will not be changed in Search API Solr.

    If you use the direct parse mode, "OR" is also the right choice to have full control over the query. You can achieve "AND" within the query:
    +foo +bar means foo AND bar

  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed about 1 month ago
  • 🇨🇦Canada infojunkie Vancouver

    Can a maintainer here shed some light on this assertion:

    The query builder only works with "OR".

    Specifically, can anyone point to specific implementation decisions that led to this limitation? Our client is looking to have "AND" as the default operator, and we'd like to respond to their request with something more constructive than "it's not possible without rewriting a new module". Thanks in advance for your cooperation!

Production build 0.71.5 2024