2

I have a drupal 7 website with pages that include multiple nodes and I use Apache Solr as search module. It works but the results are very messy.

This is a page structure exemple: page structure

As you can see, I have multiple nodes defined on my page. I'd like the indexer handles the content as page content but not like node content. In other words, I don't want the indexer handles this page as an addition of nodes but like an unique content.

In this case, I'd like to get a page URL as result but NOT multiple node URLs.

I hope it's clear enough. Thanks

1 Answer 1

-2

If I get you right, you don't want to show nodes in search results which are only used to be referenced to from another node, correct?

First of all, you need to define which Content Types should be indexed by SOLR. For this go to your SOLR settings page and untick all Content Types you don't want to show up in your search results.

After this done, I would highly recommend you to install the Display Suite module. This Module allows you to create different View-Modes. Built in and among many others which are available when you enable them, is the "Search Index" View-Mode. After enabling it for your Content-Type you can set it up the way SOLR should index it. So in your case probably the best would be to show the full content of the referenced node in the search index.

I hope this brief hints and tipps will help you ... To explain the Display Suite with all its possibilities is not possible in one post, but you really should try it.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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