I have Content types of "People" and "Projects". "Projects" have teams of "People". When creating a "Project", I use entity reference with check boxes to list and choose the "People" who are on the team.

Everything works great. After adding people to a "Project", I can visit the project and see that they are on the team. The problem is that, after I re-index my site, when I search for a person I only get a reference to their "People" content entry and not a reference to the "Project" they are in. It is very important that when searching for a person, you get the projects they are working on. How can I fix this search problem?

Comments

JoeJava’s picture

Any hints? Is there a way to add taxonomy keywords to items added via entity reference widget? I need some item (taxonomy keyword perhaps) for the search engine to index on. It refuses to index the results made by the entity widget. Perhaps there is a way to force the search indexer to index all the words of a page as it would be rendered. The "Project" page shows all members of the team but for some reason the search indexer does not index them.

damien tournoud’s picture

Category: bug » support
Status: Active » Fixed

When "searching" do you mean "using Drupal core search"? And are your entities Nodes?

If so, there is a special "Search index" view module under "Manage display" of your node type. The result of this view mode is what's actually going to end up in the index. Make sure that the Entity Reference field is displayed in there.

JoeJava’s picture

Thank you! For some reason it does not work on my regular site (probably some strange multiple module interaction), but does work on a clean install. I have many hours of "fun" ahead to find out why my regular site does not work, but I am happy to learn that the search feature will eventually work :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.