I have a CCK field in content type=bigbook called field_company. It is a text field. I would like to make sure it is being indexed, and then add a facet for it. I think it is already being indexed, but not sure.
I have looked at hook_apachesolr_cck_field_mappings and have looked at a coule examples, but nothing explains how to do it well.
Anyone with a solid example? Does the field need to be a selection/checkbox widget? Can I do it with text field?
Thanks.
Comments
Comment #1
robertdouglass commentedHave you seen this article that I wrote? http://acquia.com/blog/understanding-apachesolr-cck-api
Reopen if there are outstanding questions not covered in the article.
Comment #2
pwolanin commentedThere is a patch here to change (but improve) this behavior: http://drupal.org/node/271753
Comment #3
billnbell commentedYes. the article is good if you have a field type across all CCK and you need to create a facet. It does not address my question. I have a simple CCK field and want to make a facet on it. Howe about a facet for a field in CCK?
Comment #4
robertdouglass commentedGood questions. We need to consider these when evaluating the patch Peter linked to above.
Comment #5
billnbell commentedCan you just walk me through how it works? How do I add a facet on the page (through caching I guess). These 2 functions are not clear if you have a text field.
Thank you.
Comment #6
pwolanin commented@billinbell - see above and linked issue - currently you cannot specify per field to make facets, only per widget type.
Comment #7
pwolanin commented