2

Since search_api does not rely on the core Search module, the search bar (Search Form block) isn't used. For a current project I want to use search_api, but the wireframes require the search bar at the top of the page. The apachesolr module overrides that block so that it uses the Solr search instead of the core search when you specify that Solr is the default search. Is there a way with search_api to enable the core Search Form block and have it use a specific search page? In addition, you would also need to be able to keep the core Search module from indexing everything into the db, since that partially defeats the purpose of using Solr, but I'm guessing I could just form_alter that form (admin/config/search/settings) to add a 0 value.

Thanks.

5

Search API automatically provides you with a default search block for every search page you configure. Just place the block in the region you need it. (Disable core search altogether)

  • If you DO want the search form automatically placed at the top of the Results page, the Search Block provided by Views can be turned off by going to the "Advanced" section of the View config, and under "Exposed in Form Block", set it to "No". Then the search box will automatically appear at the top of the Search content, instead of providing a Block you can place other places. – thaddeusmt May 3 '17 at 15:56
6

I think he/she means http://drupal.org/project/search_api_page provides search blocks automatically. You could also create view that provides that block.

You could also replace the core Search module with Search api + http://drupal.org/project/search_api_db.

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.