开发者

Drupal search and views exposed filters

开发者 https://www.devze.com 2023-03-18 18:46 出处:网络
I need to customize drupal search form with different search options (color, year, type, etc). After user pressed \"Search\" but开发者_高级运维ton, drupal must show view (according to search options t

I need to customize drupal search form with different search options (color, year, type, etc). After user pressed "Search" but开发者_高级运维ton, drupal must show view (according to search options that user specified) with some addtional exposed filters. What is the best way of doing this?


As you mentioned, a view w/ exposed filters is probably best. This is what we use when performance is not at stake (i.e. Less than 100,000 nodes.) I believe if you use the correct field it will even hook into the Drupal search index. I'll edit later to confirm this.

EDIT: I was incorrect. We use the filter "Search: Search Terms". However, this still comes w/ the default install of the Search module and the Views module in both D6 and D7. So the answer would be to setup search just as you would, and then redirect "mydomain.com/search" to your custom Views based search page. You can use the filter above when searching the title or body and normal date and other filters can be applied alongside this.

NOTE: For higher numbers of nodes, we use solr to augment search, but this probably overkill for your problem.


Configure Apache Solr search and Use the color codes as facets. Follow the below url. Facet API

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号