Note
The following information on creating search pages is for Drupal 7 and the Apache Solr Search module only. If you are using Drupal 9 or later and Search API, see the Search API documentation on Drupal.org.
A search page displays search results to your website visitors. The Apache
Solr Search module comes with a search page already configured, with a
path of /search/site
. You can configure the default search page, or
create other search pages or blocks, using the Apache Solr search
> Pages/Blocks configuration page. You can use different search pages
and search blocks, each of which you can design and configure to
present the right search results with the right style for the context.
For example, you can create different search pages for the following
situations:
To create a new search page, click the Add a search page link, or copy an existing search page by clicking the Clone link under Operations.
To configure an existing search page, click the Edit link.
Every search page, like every Drupal page, needs a label and description identifying it in the Drupal content administration pages. A description helps identify how the search page must be used.
Under Search Page Information, you can configure:
%value
to include the search term in the title.
For example, if you set the search term title to Search results for
%value
and the user searches for Gold
, the search page will display
the title Search results for Gold.Your search page can use custom filters to apply to all searches. Select Custom filter, then enter one or more comma-separated filter queries to apply by default. For example, you can filter your search pages to return only blog content with the following custom filter:
bundle:blog
Custom filters use Lucene query syntax. For information about Lucene query syntax, read Apache Lucene - Query Parser Syntax.
Under Advanced Search Page Options, you can configure:
Did you
mean...?
message displayed above the search results.example.com?q=test&fq=userinput
). This works for users only
after they have executed a search using a search term. Acquia recommends
you don’t enable user input.Under Advanced Search Page Options, you can configure how the search page behaves when a search does not return any results. If you have enabled the Facets API, you can select one of the following:
For more information, read Filtering search results.