lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Aksoy <>
Subject Query returns an empty result set; but it is not empty actually!
Date Wed, 05 Oct 2005 19:43:41 GMT
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;
            IndexSearcher searcher = new 
            Query q = QueryParser.parse(sorgu, "anlam", new 
            Hits hits =;
            return sonuclariIsle(hits);
        } catch (IOException e)
            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:
For additional commands, e-mail:

View raw message