1

I'm currently trying to get a Views search page set up, but am running into a roadblock when using 2 different data sources. My process for creating a working search page, starting after installing Search API and disabling the default core search module:

  1. I go to /admin/config/search/search-api and click Add Index.
  2. In the subsequent page I give it a name (Content Index) check off Content from data sources, and choose 'Database Server' from the Server list. I click 'Save and Add Fields'.
  3. In the following 'Add Fields to index' page I add Title and click Done. I set Title's Type to Fulltext and click Save changes in the subsequent screen.
  4. I then go to the View tab and click Index now to index all of the data.
  5. I then go to /admin/structure/views and click Add view.
  6. I give my new view a name (Content Search) and in the View Settings 'Show' dropdown I select 'Index Content Index'. I check off 'Create a page' and click Save and edit.
  7. In the Edit View page, I add a filter, check off 'Fulltext search' and click 'Add and configure filter criteria'.
  8. I check off 'Expose this filter to...' and in Searched fields I click Content >> Title and then click Apply. Then I save the entire view.

When I view this page and test it, everything works fine. Anything I search for returns whatever piece of content has the search term as it's title. When I set this up in the same way for Field Collections, it works perfectly.

When I set the index to account for two data sources in step 2, it seems to index all of the content I want, but the search results only return the content that contains the search term and not the field collections that have that term.

Is there a setting anywhere I need to adjust to account for both data sources?

Your Answer

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

Browse other questions tagged or ask your own question.