1

I want to have search inputs for users to search and find other users based on associated terms(I'm using term reference) of their user profile. I'm using Search-API, Views-3, and Profile-2. I created fields on the profile that have terms as check boxes. But, I can't seem to figure out how to make a view with search inputs to find/search users by these terms.

~Then, this is probably a question for a different post. But, could I filter the RESULTS to display only certain aspects of that users profile? I would want the results to render a custom user-teaserprofile.tpl.php or something like that. Thank you.

...the whole approach is somewhat related to a dating search or something like that.

1

With search API you create an index containing all the info that should be searchable. The easiest thing would probably be to create an index based on the Profile entity and add the reference to the User entity and add the fields you need, like the term reference.

If you only want to let users search on the term reference, you might want to exclude normal search altogether and use facets instead, that would allow users to select terms and get the users displayed. Alternatively you could just use Views alone since Search API in not needed if you don't do fuldtext search.

With or without Search API you can in Views select the fields you want to display, just like any view, and use the template options Views provide to customize the output of the search page.

| improve this answer | |

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.