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 am using apachesolr-7.x-1.0-rc4 and apachesolr_views-7.x-1.0-beta1. i am showing result with the help of apache solr view. Solr is indexing most of the fields of selected content type. But the value in content field contain the attached file name and node creation date (see screenshot). I just want that content field contain only body field of node.
Comment | File | Size | Author |
---|---|---|---|
solr content contain attached file.jpg | 58.5 KB | msankhala | |
solr content.jpg | 44.39 KB | msankhala |
Comments
Comment #1
Nick_vhThe content field is a node_render of the node.
You can change this in the UI : admin/structure/types/manage/NODE_TYPE/display/search_index (if you don't have the search index field display type, you can easily add it in the settings there.)
I suggest you figure out how to alter the search_index render and take it from there. Or overwrite the content field in the hooks that are designed to so?
Comment #3
abelass CreditAttribution: abelass commentedI have the same issue, body field and another custom text field are merged into the content field but not available seperately. In which form/ui can this be done?
Comment #4
abelass CreditAttribution: abelass commentedForget about my message before. I managed to do with the hook hook_apachesolr_index_document_build_ENTITY_TYP