Hi all,

I am trying to use the QueryParser.parse() to parse a query string like "java* 
developer". Note that I want the wildcard string, java*, followed by the word 
developer. The following is the code.

-------------
String qryStr = "\"java* developer\"";
String fieldname = "text";
StandardAnalyzer analyzer = new StandAnalyzer();

Query qry = org.apache.lucene.queryParser.QueryParser.parse(qryStr, fieldname, 
analyzer);
-------------

When I do a qryStr.toString() to print out the contents, I got the following 
output:

---------------------
text:"java developer"
---------------------

Look likes that the wildcard query disappeared. In fact, I am expecting 
text:"java* developer" to be returned. It seems to me that the QueryParser 
cannot handle the wildcard within a quoted String.

Does anyone has a solution on this? Am I missing something in the code?

Thanks,
Terence





----------------------------------------------------------
Get your free email account from http://www.trekspace.com
          Your Internet Virtual Desktop!

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

Reply via email to