Hi there,

I have a field that I would like to exclude from search and display. It's the price. Somehow it ends up being listed in front of every snippet. Attached is a picture displaying the issue.

If I do dpm($node) on node.tpl.php, it's the $node->sell_price field.

How do I remove it from being searched and displayed?

I can do a str_replace() or preg_replace() in search-result.tpl.php, but I would much prefer to just tell Apache Solr to ignore it.

Thanks,
Andrey.

CommentFileSizeAuthor
search_price.jpg217.66 KBmr.andrey

Comments

nick_vh’s picture

Status: Active » Closed (works as designed)

You could implement hook_apachesolr_update_index to verify if the content field has your price and remove it there. You can also try to not show your field in the display of the node (display mode, set to hidden) so it won't show in the search result.

Hopefully you have found your solution in the meantime