Setting a filter to "Is not equal to" is broken in the latest dev branch. This is because my query outputs like this:
http://localhost:8983/solr/drupal/select?start=0&rows=10&&fl=id,entity_id,path_alias,label,ss_field_teaser&sort=&qf=content^40&qf=label^5.0&qf=tags_inline^1.0&qf=taxonomy_names^2.0&qf=tos_name^3.0&qf=ss_author&qf=tm_description&qf=tm_city&q.alt=(((-id:(3x4i52/node/7)) AND (bundle:(blog))))&wt=json&json.nl=map
The issue is the fact that we're trying to do an exclude in the q.alt parameter. This is due to over-exuberant parenthesis in our query string. Because the field no longer starts with "-", but instead starts with "((-", apachesolr doesn't know to set the field to '#exclude'.
I tracked this down to hash 5f15f3b2, related to https://www.drupal.org/node/2304685
The patch recommended in that issue was not the patch applied, even though it works and doesn't destroy NOT queries. I'm going to re-roll the patch against the latest dev version with the next comment.
Comment | File | Size | Author |
---|---|---|---|
#1 | apachesolr_views-not_filters-2408899-1.patch | 1.04 KB | mariacha1 |
Comments
Comment #1
mariacha1 CreditAttribution: mariacha1 commentedHere's that patch.
Comment #3
MiroslavBanov CreditAttribution: MiroslavBanov commentedThanks for the patch. Did not realize that the committed version introduced a regression that the original patch didn't. In my tests the original patch worked just fine, but I had thought to slightly simplify the code.