7

I have two content types, with Drupal 7 :

  • City
  • Job Offer, with an Entity Reference CCK field named "City" that accept Node Entities of Type City.

I am also using the apachesolr module, with Facet API, and I would like my users to be able to filter the offers by city. However, as I have thousands of cities in the database, the "Links" widget is unusable.

How could I easily integrate the Entity Reference module's autocomplete widget (or https://drupal.org/project/entityreference_autocomplete, or any other one...) with the Facet API ?

3
+100

If you are using the Search API Solr with the Facet API, you can create a search index view and use the Facetapi Multiselect along with Chosen to allow your users to select the city via a user friendly drop down box (chosen not only supports typing the search term, but it also allows fuzzy matching). Even if the content type city is not indexed in Apache solr, you can create a relationship in your search view and make the city available to FacetAPI system. You can even expose the city as a filter (if you do not want to mess with facets at all) to your users with a views' relationship.

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.