elo!,

I've read all documentation and still nothing.

My CCK fields gets indexed, but when searching, only title and body fields gets me results.
If I search strings that are title or are contained in body field of node i get results.
But searching for strings contained in text CCK field gives nothing.

Is there something more i should configure?

Comments

kevin.dutra’s picture

I think the problem here may be twofold:

First, it looks like text CCK fields are indexed as the "string" type, which isn't analyzed at all, so I believe you'd only find a result if you search for the exact match of the text. For example, you create a node and fill in "my Value" for the field. If you search for "my", "value", or "my value", you get no results back. If you search for "my Value", you get that node.

Second, if you have a field using allowed values where you use the key/value format, e.g.

1|First value
2|Second value

the key is the part that gets indexed. So if you choose "First value" on your node, you would end up having to search for "1" to find it, which isn't intuitive.

mkalkbrenner’s picture

Issue summary: View changes

You might have to set a bias for these fields, otherwise they are not searched.

kevin.dutra’s picture

Indeed, adjusting the bias would be part of it, but I think my earlier analysis still holds true. The field mapping for text fields defines them as "string" type:

function content_apachesolr_field_mappings() {
...
'text' => array(
      'indexing_callback' => 'apachesolr_index_content_text_indexing_callback',
      'index_type' => 'string',
      'facets' => TRUE,
      'query types' => array('term'),
      'query type' => 'term',
      'facet mincount allowed' => TRUE,
    ),
...
}

This would be fine for use in facets, but makes searching difficult, since the "string" typed fields (ss_* & sm_*) are not analyzed, so they would only return documents if your search string was an exact match for the field value, whereas if they were indexed as "text" typed fields (ts_* & tm_*), they would be easily searchable because those fields get analyzed (tokenized, stemmed, etc.).