solrkeywordspell-checkingkeyword-searchsolr-query-syntax

Apache Solr spellCheck polish characters in email


Using solr query to get the emails. Query returned the keyword like this. Keyword I am getting ( ±êææ³ñ¶¶¿¼¶ ) and Required Keywords is ( ąęććłńśśżźś )


Solution

  • The problem is with encoding. However you are extracting the text, apply encoding as the detected charset. You can specify the encoding in the metadata or you can convert the text to any encoding. Ex- new String(targetString.getBytes(), "ISO-8859-2") or new String(targetString.getBytes(), "UTF-8")