Solr problems identification |
Feb 28 |
Here you can find a quick-recognize list that can help you to identify Solr error that hiding behind your application business logic.
Symptoms and possible causes.
There is a few symptoms that can help you to identify a problem:
- Searching is fine, indexing is not working. When you change your data and no change appears in index and you cannot search by the new data.
Possible causes:- Your application don’t add’n’commit data into Solr. Solr need to commit changes to see changed data in index.
Check errors/exceptions in your application server log files - Solr index deadlocks.
Try to push info to Solr index manually using magic command. If no result appears after command execution and execution just freezes — it is a lock. You have to check sudo kill -3 SOLRPID to be sure.
- Your application don’t add’n’commit data into Solr. Solr need to commit changes to see changed data in index.
- Searching returns wrong (maybe not unique) results.
There can be a few possible causes:- Wrong search query.
You have to check your query. Is it created right? - Wrong index data.
You have to check an appropriate indexer to clarify index data constructing process. If there are no errors you can try to push some entry data into Solr index. Use magic command to add data into index (sometimes it is useful to specify all document fields in command to check if there are any problem with specific field). - Solr startup exception
If search returns an empty result it can be caused by Solr startup error. You have to check Solr log files to identify it. - Index corruption.
After searching query identification you have to try to search the query in Solr admin console. If wrong results appears — it is index corruption. You have to fire index rebuild (old index deletion is not necessary but preferable).
- Wrong search query.
- Search don’t work.
- Exception during searching.
Check log files for exceptions and errors. Connection refused (Solr master/backup server is down)? Are there any exceptions in your application during index data gathering? - Solr startup exception
If search returns an empty result or returns an error it can be caused by Solr startup error. You have to check Solr log files to identify it.
- Exception during searching.
Magic command
SolrJ client version 1.2 cannot show errors returned from server during indexing process. So we need to manually execute index add/commit operations to see server return message.
user@server$ curl http://solrserver.com/update -H "Content-Type: text/xml" --data-binary '<add><doc><field name="id">999999</field></doc></add>'
user@server$ curl http://solrserver.com/update -H "Content-Type: text/xml" --data-binary '<commit/>'
a good response is:
<result status="0"></result>
There can be any other errors and if you cannot identify some with this quick-recognizing list you need to keep digging inside your log files and stack traces ![]()
[…] also you can read solr problems identification […]