lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yahootintin.1247...@bloglines.com
Subject Re: Searching for asterisk in a term
Date Wed, 07 Jul 2004 19:41:46 GMT
Can you recommend an analyzer that doesn't discard '*' or '/'?

--- Lucene
Users List" <lucene-user@jakarta.apache.org wrote:
The first thing you'll
want to check is that you are using an Analyzer
> that does not discard that
'*' before indexing.  StandardAnalyzer, for
> instance, will discard it.
 Check one of Erik Hatcher's articles that
> includes a tool that helps you
see what your Analyzer does with the any
> given text input.  You can also
use Luke to see what your index
> contains.
> 
> Otis
> 
> --- yahootintin.1247688@bloglines.com
wrote:
> > Hi,
> > 
> > I'm trying to search for a term that contains an
asterisk.  
> > 
> > This
> > is the field that I indexed:
> > - new Field("testField",
"Hello *foo bar", true,
> > true, true);
> > 
> > I'm trying to find this
document by matching '*foo':
> > - new
> > TermQuery(new Term("testField",
"*me"));
> > 
> > I've also tried to escape the
> > * like this:
> > -
new TermQuery(new Term("testField", "\\*me"));
> > 
> > Neither
> > of
these queries return this document.  Is this type of search
> > possible
with
> > Lucene?
> > 
> > Thanks.
> > 
> > ---------------------------------------------------------------------

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

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

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


Mime
View raw message