lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " Сергій Карпенко" <bergschl...@ukr.net>
Subject Re[2]: How I can find wildcard symbol with WildcardQuery?
Date Tue, 19 Aug 2008 15:10:53 GMT
Yes, you are correct - NO_NORMS has nothing to do with tokenization, thats mean no analyzers
used. String fall's in index as single term.    
But, what about our wildcard symbols?    
    
Re: How I can find wildcard symbol with WildcardQuery?    
    
    Before going down this path I'd really recommend you get a copy of Luke    
and look at your index. Depending upon the analyzer you're using, you    
may or may not have w*orld indexed. You may have the tokens:    
w    
orld    
    
with the * dropped completely.    
    
As far as I know, NO_NORMS has nothing to do with tokenization, the    
critical question is what *analyzer* you're using to index.    
    
And you could always sidestep the issue entirely by pre-processing    
your text and query to replace * with something else.    
    
But for escaping, see:    
http://lucene.apache.org/java/2_3_2/queryparsersyntax.html    
    
Best    
Erick    
    
2008/8/19 Сергій Карпенко <bergschloss@ukr.net>    
    
>    
> 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    
>    
>    
>    
>    
    
    
  
Mime
  • Unnamed multipart/alternative (inline, Binary, 0 bytes)
View raw message