For an index created with StandardAnalyzer, with fields called "go_desc"
and "pu_desc", I construct the following query using QueryParser with
the StandardAnalyzer:

annotQueryStr = "go_desc:\"intracellular signaling\"";
 Query query = 
                QueryParser.parse(annotQueryStr,"pu_desc", new StandardAnalyzer());
log.writeToLog(Log.DEBUG," query is " + query.toString("pu_desc"));

My log output shows that the Query is parsed as:
         query is go_desc:"intracellular signaling"

So that seems to be working fine, and the query returns the expected
results.

If I construct add a wildcard to the query:
annotQueryStr = "go_desc:\"intracellular signal*ng\"";
 Query query = 
                QueryParser.parse(annotQueryStr,"pu_desc", new StandardAnalyzer());
log.writeToLog(Log.DEBUG," query is " + query.toString("pu_desc"));

My log output shows that the wilcard is replaced by whitespace:
        query is go_desc:"intracellular signal ng"
and this returns no results.

Why should StandardAnalyzer be doing this?  Note that this only happens
with "quoted" search terms.  If I try

annotQueryStr = "go_desc:signal*ng";
My logfile shows that
        query is go_desc:signal*ng

So it's handling wildcards fine in this case.

thanks,
--David Goodstein



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

Reply via email to