-2

Core search in Drupal 7 not searching the content in the node which has been fetched through an entity reference field.

What could be the solution to search for a keyword in all pages of the website?

Would there be any alternative?

2

The search index is build from a special view mode for nodes, called 'search_index'.

The easiest way to configure this is

  • Install/enable Entity View Modes
  • Enable configuration of the 'search_index' view mode for your content type. I believe it will appear as a tab under /admin/structure/types/manage/page
  • Configure the 'search_index' at /admin/structure/types/manage/page/display/search_index
  • Add/remove fields as needed. For your entity reference, change the display to "rendered entity".

Clear the search index, and rebuild it.

  • This is going by memory, as I am not sure if I have any Drupal 7 left that do this. Some details may need to be adjusted. – mpdonadio Oct 10 '18 at 12:50
  • Thank you so much for the answer. Will try this and let you know – N N Oct 10 '18 at 13:25
  • Yes, now its searching content referenced through entity reference field .Thank you. – N N Oct 11 '18 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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