Apache Solr Views Tutorial

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'nodereference_autocomplete_access' was given in /home/mnnnecdq/public_html/drupalme/includes/menu.inc on line 452.
Wednesday, February 3, 2010 - 21:30

Finally finished my latest project Qrant.no. and Apache Solr Search from Acquia is one of it`s services. The module is really great, it gives you outstanding search features like faceted search, related items block and sort options.

This tutorial is about how I created pages that lists taxonomy terms which links to solrsearch and shows search results. This was not easy, at first I thought the faceted blocks could be used anywhere, maybe it`s possible but I didn`t figured it out. Custom pages with views is more fun anyways, great theming options. Ok, this is heavy stuff...

Key settings for this view is, Relationship Parent term, Filter on Vocabulary and rewriting the output with link. You also need a very nice module to show how many nodes there are within each category. The module is called Term Node Count.

01. Teh page.
02. The link created with a Term view
03. The search result, showing faceted blocks etc.
04. This is the view, style grid and row style Inline fields.
05. The first field is Term, select Exclude from display, adding this field will gives you an option to use it with the TermID field
06. Add TermID and rewrite it like on the picture, change type to the desired content type youre searching.
07. Replacement patterns, name is present because of the hidden Term field.
08. Thousands separator should be blank if you have a lot of terms, like me, about 5000! kekaoo!
09. No duplicates, the Parent Term relationship is used on Taxonomy Vocabulary.
10. Select Relationship and Is empty. Click save and preview.

Comments

Add comment

The content of this field is kept private and will not be shown publicly.