lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kwon, Ohsang" <osk...@thinkfree.com>
Subject RE: How I can find wildcard symbol with WildcardQuery?
Date Wed, 20 Aug 2008 04:28:57 GMT
Why do you use to WildcardQuery? You are not need to whildcard. (maybe..)
Use term query.

Term term = new Term("field", "Hello w*orld");
Query query1 = new TermQuery(term);

gimme post
-----Original Message-----
From: Сергій Карпенко [mailto:bergschloss@ukr.net] 
Sent: Tuesday, August 19, 2008 10:20 PM
To: java-user@lucene.apache.org
Subject: How I can find wildcard symbol with WildcardQuery?


Hello    
    
For example, we have a text:    
    
" Hello w*orld"    
 it's indexed as NO_NORMS, so this phrase is term.    
    
And I have a code:    
    
Query query = new WildcardQuery(new Term("field", " Hello w*orld")); its
work    
    
But I need symbol '*' as ordinary symbol, not escape symbol.    
    
The QueryParser's analogue '\\*'    
Query query = new WildcardQuery(new Term("field", " Hello w\\*orld"));    
don't wokrs.    
    
Thanks    
    
    
    
  


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


Mime
View raw message