I'm wondering how to pull the node reference into a view based on a search index. I did this with my earlier product catalog by adding a relationship to the product referenced node, adding the node reference, and then rewriting my image's output as a link.

With the view set on my search index, I don't have the option to add a relationship to the referenced node, so I'm not sure where to pull the node reference from to link the images back to their product displays.

Any advice would be appreciated. Thanks in advance.


A search API based view can just take fields and information which are put into the index. Go to the index settings page and add the reference field. Then you can add addtional fields and relations connected to the reference.

| improve this answer | |
  • The index is set on the Commerce_Product entity type. The closest thing to what I'm looking for is a field called "Feed NID" which I'm not sure if that will get me to the node reference. Any ideas? – nizz0k Jul 19 '14 at 2:10
  • What should "Feed NID" be??? Did you add the reference field to the index? – Tobias Krause Jul 21 '14 at 7:13
  • There is no option to add a node ID or other node reference in list of options presented in my index. Neither is there any option among the related fields. I think this is related to the problem of pulling in the 'add to cart button' into the search index...I'm tinkering with this now. – nizz0k Jul 22 '14 at 1:33
  • Answer above didn't address my use case, solved this issue by choosing an index on the product displays, not the products. – nizz0k Nov 11 '14 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.