Solr, text encoding and unhelpful error messages
I was getting an error loading any pages in the Solr admin UI:
What this is supposed to mean is that you have a multicore Solr setup and have not included the core name in your URL used to load the admin UI. However, I don’t have more than one core; a single one is fine for my needs right now.
It turned out that the problem was quite a far cry from that which the error message implied. I had a solr.DictionaryCompoundWordTokenFilterFactory
filter loaded with a dictionary text file that was not UTF-8. The filter assumes UTF-8 and so was choking on my file.
The solution was to use iconv
to re-encode the dictionary file, but not before a lot of head-scratching. Even the traceback in the terminal wasn’t great, about an error in STREAM
, though at least the “stream” tipped me off that it might be an issue with loading a file—once I’d figured out that if I disabled my filter the Solr admin UI would load.
Update: Looks like this happens for any configuration error; check your solr logs to see what the failure is.