Honestly this is a really great module.. I'm just having a few issues since the documentation isn't entirely that clear.. if you could help me that would be super awesome!
I'm having two major problems with this module that I can't figure out.
1. What is the proper format for returning values in your callback....
Is it $fields[] = array('value' => 'your value here'); or something else?
2. It's not really clear to me how to access these fields after they have been indexed? Specifically if I output the result set that comes back I don't see any of the CCK fields that have been indexed. I saw you posted a suggestion before with regards to accessing the node from node_load but if it's being indexed with data I'd rather just grab that instead?
3. Do I need to actually add these fields to my solr configuration? That part is also not clear...
Comments
Comment #1
robbin.zhao commented1. it is the value of this indexed field value,
such as, here is a field you created, 'is_test', means int/single, so it should be a int value
if multi values, just return array, like array(11,2,3)
2. the solr will return the document object, so the data is the field of the document field value, such as $document->is_test
3. no need to change solr config, it support generic value already.
i am not sure if it is clear, hope it is helpful.
Thanks,
-Robbin
Comment #2
shaneonabike commentedActually what I discovered is that I could never get this working until I implemented the hook for apachesolr_modify_query. I think that normally adding these fields to this means that they are indexed properly. Just wondering if the module should include this hook and add these variables??
Comment #3
robbin.zhao commentedYour fields are file/image/media ?
Oh, I don't think I consider these fields.
I will check your question later.
Thanks!
Comment #4
Anonymous (not verified) commentedHello.
I see that I should attach fields manualy while making a query, should not I?
Thank you.
Comment #5
robbin.zhao commentedyes, if you want to use custom fields, add a query in SOLR search keys, it will work.