I have a site that enables you to register either as a "Care giver" or a "Patient". The patient has a different profile (Profile2 module) with options such as the type of care they need, the amount of money they can pay a care giver, etc.

The care giver profile has a work profile (much like a resume).

What I want to accomplish:

Create a custom "Search patients" search for the care givers Create a custom "Search care givers" search for the patients.

How do I limit apachesolr to a profile2 search?

2 Answers 2


Checkout the Search API module - this was developed to solve problems exactly like this. With Search API, you can configure multiple search engines, define the datasource it pulls them from (ex. Apache Solr) and then use its built-in views integration to create custom search sets (ex. for care givers pull only from these entities / content types, and show only these fields).


You can also create new custom search page via apachesolr module and provide view integration with Apache Solr Views module. However Search API solution is more flexible and has better integration with Panels, Views and other contrib modules.

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.