I have a document with a field as title that matters - Mörder (with umlaut o).
When I retrieve it in java using the following method, the value returned in both print commands is Morder (from umlaut to r). It’s strange.
When I go to the web interface provided by Solr, the name is Mörder (with umlaut o).
Can someone tell me what is going wrong?
SolrQuery query = new SolrQuery(); query.setParam("q", "<some query>"); query.setStart(start); query.setRows(rows); query.setFacet(false); query.setFields("title"); QueryResponse rsp = server.query(query); SolrDocumentList sdl = rsp.getResults(); for (SolrDocument sdOl : sdl) { System.out.println(sdOl.getFieldValue("title")); System.out.println(new String(sdOl.getFieldValue("title").toString().getBytes, "UTF-8")); }
EDIT
I actually compare the names of documents with 2 cores. One returns the correct umlauts, but the other always moves the umlauts to the next character.
source share