Closed (works as designed)
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2011 at 18:51 UTC
Updated:
29 Dec 2011 at 10:15 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| search_price.jpg | 217.66 KB | mr.andrey |
Comments
Comment #1
nick_vhYou 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