Hi
I'm writing a custom filter for the search_api_solr that uses the OR #conjunction.
With the OR #conjunction the query type is switched to standard (as expected) but the generated query (when run against solr directly) results in this error.

no field name specified in query and no defaultSearchField defined in schema.xml

The field names are in the query, however they've been supplemented with the boost figures (ie ^1.0) which are for the dismax query type.
Removing the boost figures from the field names fixes the issues. The attached patch contains the fix.

Lee

CommentFileSizeAuthor
search_api_solr_boost_OR.patch598 byteslarowlan

Comments

larowlan’s picture

Title: OR queries through 400 error » OR queries throw 400 error
Status: Active » Needs review
drunken monkey’s picture

Status: Needs review » Fixed

Great patch, thanks! Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.