Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to index cck field of type text area in solr: drupal6
    primarykey
    data
    text
    <p>I've created a cck filed of type <strong>textarea</strong> with name <strong>filed_desc</strong>, how do i get this field to index in solr. </p> <p>i found this article <a href="http://acquia.com/blog/understanding-apachesolr-cck-api" rel="nofollow noreferrer">http://acquia.com/blog/understanding-apachesolr-cck-api</a>, i have tried this but it is not indexing the filed, can somebody help.</p> <pre><code> &lt;?php // $Id$ /** * Implementation of hook_apachesolr_cck_fields_alter */ function example_apachesolr_cck_fields_alter(&amp;$mappings) { // either for all CCK of a given field_type and widget option // 'filefield' is here the CCK field_type. Correlates to $field['field_type'] $mappings['text'] = array( 'text_textarea' =&gt; array('callback' =&gt; 'example_callback', 'index_type' =&gt; 'string'), ); } /** * A function that gets called during indexing. * @node The current node being indexed * @fieldname The current field being indexed * * @return an array of arrays. Each inner array is a value, and must be * keyed 'value' =&gt; $value */ function example_callback($node, $fieldname) { $fields = array(); foreach ($node-&gt;$fieldname as $field) { // In this case we are indexing the filemime type. While this technically // makes it possible that we could search for nodes based on the mime type // of their file fields, the real purpose is to have facet blocks during // searching. $fields[] = array('value' =&gt; $field['field_desc']); } return $fields; } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload