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

--- [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to