Sorry for that, Here is how the Analyzer is Selected: public static Analyzer getAnalyzerInstance(String localeKey) { Analyzer analyzer = null; if (localeKey == null || localeKey.trim().equals("")) { localeKey = AppContext.getSetting("defaultLocale"); System.out.println("<><><>><><><><><Locale key taken as Default "); } else { // localeKey may be a csv of locales, in which case picj the first // one. localeKey = StringUtils.split(localeKey, ",")[0].trim(); System.out.println("<><><>><><><><><Locale key is trimmed"); } System.out.println("<><><>><><><><><Locale is " + localeKey); String name = (String) _analyzerMap.get(localeKey); System.out.println("<><><>><><><><><Name from Locale is " + name); if (name == null) { analyzer = new StandardAnalyzer(); } else { // if (name.equalsIgnoreCase("Arabic")) { // analyzer = new ArabicAnalyzer(); // } else { analyzer = new SnowballAnalyzer(name); // } } return analyzer; } While Indexing some are analyzed and some are not... document.add(new Field(FIELD_DOCUMENT_CREATED_ON, LocaleUtils .convert8859_6ToUTF8(com.aurigalogic.activesite.field.Field .indexableDate(avsDoc.getCreatedOn())), Field.Store.YES, Field.Index.NOT_ANALYZED)); ... document.add(new Field(FIELD_CONTENT_TYPE, LocaleUtils .convert8859_6ToUTF8(version.getDocument() .getContentDescriptor().getName()), Field.Store.YES, Field.Index.ANALYZED));Currently the method LocaleUtils.convert8859_6ToUTF8 does nothing but returns the parameter as is. While seraching the Query parser etc. are created like Analyzer analyzer = AnalyzerSelector.getAnalyzerInstance(locale); ... QueryParser qparser = new QueryParser(Constants.FIELD_BODY, analyzer); ...So while posting the form with a Arabic word does not fetch the results. An English word does work though!! I would be more that helpful if anything else is required. Regards,
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. On 12/29/2008 6:16 PM, Grant Ingersoll wrote: Hi Girish, |
--------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org