lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Loss of wildcard when search term is quoted with StandardAnalyzer
Date Mon, 12 Aug 2002 19:07:41 GMT
Which version of Lucene are you using?
This should work with the latest (nightly) versions.
There are even tests that excercise this functionality and they pass.

Otis

--- DMGoodstein@lbl.gov wrote:
> 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:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message