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.
I got very frustrated just now with the existing code - we should index all text an integer fields using optionwidgets - for example, an int on/off checkbox could be very handy as a facet of for query-time boosting.
Comment | File | Size | Author |
---|---|---|---|
#3 | 949768-more-cck-3.patch | 3.39 KB | pwolanin |
#2 | 949768-more-cck-1.patch | 1.75 KB | pwolanin |
Comments
Comment #1
robertDouglass CreditAttribution: robertDouglass commentedYes. Can we do these things in the 6.x-2.x branch? It already has a much more flexible API for dealing with CCK.
Comment #2
pwolanin CreditAttribution: pwolanin commentedstarter patch.
Note I used sint by default since I assume people might rely on the sort-missing-last functionality. Could be tint instead, however.
Comment #3
pwolanin CreditAttribution: pwolanin commentedcommitted my patch to 6.x-1.x. Here's a starter patch for 6.x-2.x
Comment #4
davidwhthomas CreditAttribution: davidwhthomas commentedHere's a
hook_apachesolr_cck_fields_alter
implementation I used to successfully add facets for integer fields for apachesolr version = "6.x-1.2"In this case it was for real estate listings to provide 'Bedrooms' and 'Bathrooms' facets.
You'll also then need to enable the facets at: /admin/settings/apachesolr/enabled-filters
HTH,
DT
Comment #5
davidwhthomas CreditAttribution: davidwhthomas commentedAnd one more update, here's what I needed to do to get integer field facets working with version = "6.x-2.0-beta3"
I see the new code has facet info for some integer fields, but not the default 'number' one.
So perhaps the other widget types aren't needed here.
Comment #6
joetsuihk CreditAttribution: joetsuihk commentedbelow is invalid, sorry
the patch #3 on 6.x-2.x-beta3 do not add integer with widget "textfield"
It only add widget "select" or "checkbox"
Comment #7
joetsuihk CreditAttribution: joetsuihk commentedComment #8
pwolanin CreditAttribution: pwolanin commentedWhich patch are you saying is RTBC?
Comment #9
joetsuihk CreditAttribution: joetsuihk commentedpatch #3 tested on 6.x-beta3.
I have no idea what #5 is talking about, but i can have filters on integers value that use dropdown/checkbox as widget.
Comment #10
pwolanin CreditAttribution: pwolanin commentedcommitted to 6.x-2.x