lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tirupathi reddy <>
Subject Some problem with prefix wilcard search
Date Mon, 19 Sep 2005 08:41:14 GMT
  I am using Lucene for for searching in my application. 
My application needs prefix wildcard search also. 
But Lucene doesn't support this. So I changed in the QueryParser.jj file
              (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
 | <WILDTERM:  (<_TERM_CHAR> | ( [ "*", "?" ] ))* >

And then I build it using ant and then by using
 command ant -Djavacc.home = C:/javac javacc
And both times it was saying build was successful. 
Then I  put in the classpath, the newly generated jar file in build directory
instead of lucene-current.jar. Even then it is not working for 
prefix wildcard search (e.g. *patent). And I am getting the following error:
caught a class org.apache.lucene.queryParser.ParseException
  with message: Lexical error at line 1, column 2.  Encountered:  
 "*" (42), after   : ""

Is it the correct way for to make it work for prefix wildcard
search using lucene.
Is there any thing wrong I am doing?
Is there any other way to do this?
part of my querying code is:
Query query = QueryParser.parse(query,"ALL",analyzer);
Hits hits =;
And the query I am passing e.g. is *static.
So please any one help me to solve this problem.

Tirupati Reddy Manyam 
79110 Freiburg 

Phone: 00497618811257 
cell : 004917624649007

Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message