This patch performs a ping before doing a search and displays an error message to the user if the connection cannot be made.

Alternatively, a better approach may be to save the state of the ping from the hook_requirements call to avoid doing the ping again. But my site is not going to be high in traffic, so an extra ping won't hurt.

-Matt

CommentFileSizeAuthor
apache-solr-search-ping.patch1.03 KBmattconnolly

Comments

robertdouglass’s picture

I could see pinging the server when we display a search form (but haven't done a search). This would prevent someone from trying to search if the solr server is down. However, it seems to me that if we send a search request and the server is not there we should be to determine this information without any extra requests.

pwolanin’s picture

Status: Needs review » Closed (won't fix)