Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In addition to the basic argument handling, it would be great to have the ability to pass in multiple values as in normal views arguments. Also, in order to be consistent with views, the handler should support the ability to exclude these items.
Comments
Comment #1
joel_osc CreditAttribution: joel_osc commentedHere is a patch for review and testing.
Comment #2
joel_osc CreditAttribution: joel_osc commentedFixed an error due to the default operator not being set.
Comment #3
joel_osc CreditAttribution: joel_osc commentedOops... masked a bug in last patch - this should actually fix it.
Comment #4
elstudio CreditAttribution: elstudio commentedWorks for me!
Patch #3 is extremely helpful -- thanks!
Comment #5
hefox CreditAttribution: hefox commentedLooks like this patch covers #1425464: Apache Solr View Argument Handlers Missing D7 also
edit: nevermind, didn't look at the issue status of the other issue, other then that my make file was using it
Comment #6
hefox CreditAttribution: hefox commentedUpdated patches, one for alpha3 and one for dev
Comment #7
hefox CreditAttribution: hefox commentedMessed up the real patch
Comment #8
hefox CreditAttribution: hefox commentedHm, not didn't work, so switched it over to using what the field handler does for not.
Comment #9
MiroslavBanov CreditAttribution: MiroslavBanov commentedLooking at the last patch, I don't think that 'not' and 'break_phrase' would work well together. The "-" would be applied to the first one only. Also, if consistency with Views is the goal, this should probably be a
apachesolr_views_handler_argument_numeric
handler that inheritsapachesolr_views_handler_argument
.Comment #10
hefox CreditAttribution: hefox commentedSorry, haven't looked into the internals of how add_where works, but
So, value is now VAL1 AND VAL 2 AND VAL 3;
It's adding the '-' to field name looks like, so
-field_name = VAL1 AND VAL 2 AND VAL 3
I don't think this would apply to just one value since it's negative is on field name and not value.
Other then rolling it so patch applies to -dev, the only difference I recall adding was handing the negative, no opinion on _numeric or not.
Comment #11
MiroslavBanov CreditAttribution: MiroslavBanov commentedYes, you're right. I got confused about the "-". It applies to the entire field.