views:

98

answers:

1

I have indexed a database of some texts and the database texts are of unicode encoding. When I search an english word with lucene search everything goes OK. But when I use a non-English query like: "تو" it gives me the following exception:

Exception in thread "main" org.apache.lucene.queryParser.ParseException: Cannot parse '??': '' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:187) at Search.main(Search.java:151) Caused by: org.apache.lucene.queryParser.ParseException: '' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryParser.QueryParser.getWildcardQuery(QueryParser.java:923) at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1347) at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1250) at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1178) at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1167) at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:182) ... 1 more

What should I do?

Thank you.

+1  A: 
Ankit Jain
Good idea but I have checked that before. It is not the source of problem.
Shayan
I checked it again. You are right. This was the problem.
Shayan