Hi,
I have a dictionary. It is indexed as follows:

   private Document buildDocument(SozlukBirimi birim){
       Document doc = new Document();
       doc.add(Field.Keyword("soz", birim.getSoz()));
       doc.add(Field.Text("soz1", birim.getSoz()));
       doc.add(Field.Text("anlam", birim.getAnlam()));
       return doc;
   }

And my query is defined as:

   public List gelismisAnlamAra(String sorgu) throws ParseException
   {
       if(sorgu==null || sorgu.length()<2)
         return Collections.EMPTY_LIST;
       try
       {
IndexSearcher searcher = new IndexSearcher(Indeksleyici.getRootDir()+Indeksleyici.INDEX_ROOT); Query q = QueryParser.parse(sorgu, "anlam", new TurkishAnalyser());
           Hits hits = searcher.search(q);
           return sonuclariIsle(hits);
       } catch (IOException e)
       {
           e.printStackTrace();
           return Collections.EMPTY_LIST;
       }
   }

TurkishAnalyzer is very simple!

public class TurkishAnalyser extends StandardAnalyzer
{
   private static Set _stopTable;

   public static final String[] STOP_WORDS =
           {
           ",", "$", ";", "-", ".",":"
           };
}

Some single Turkish words "menteşe", "eczane", "menekşe" returns an empty list for the query. However, when a "*", or a "?" appended at the end of the query string, it returns the actual words in the result set.
What might the reason for that problem?
IMHO, Turkish characters do not have an affect on the problem. For example in "eczane" there is no special Turkish characters, but it has the same problem.

Ahmet Aksoy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to