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
| Comment | File | Size | Author |
|---|---|---|---|
| apache-solr-search-ping.patch | 1.03 KB | mattconnolly |
Comments
Comment #1
robertdouglass commentedI 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.
Comment #2
pwolanin commented