lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-java Wiki] Update of "LuceneFAQ" by DanielNaber
Date Mon, 14 Apr 2008 19:10:06 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The following page has been changed by DanielNaber:
http://wiki.apache.org/lucene-java/LuceneFAQ

The comment on the change is:
mention MultiPhraseQuery

------------------------------------------------------------------------------
  Another wild card character that you can use is '?', a question mark.  The ? will match
a single character.  This allows you to perform queries such as ''Bra?il''. Such a query will
match both ''Brasil'' and ''Brazil''.  Lucene refers to this type of a query as a 'wildcard
query'.
  
  Leading wildcards (e.g. ''*ook'') are '''not''' supported by the !QueryParser by default.
As of Lucene 2.1, they can be enabled by calling `QueryParser.setAllowLeadingWildcard( true
)`. Note that this can be an expensive operation: it requires scanning the list of tokens
in the index in its entirety to look for those that match the pattern.
+ 
+ 
+ ==== Can I combine wildcard and phrase search, e.g. "foo ba*"? ====
+ 
+ This is not supported by !QueryParser, but you could extend the !QueryParser to build a
[http://lucene.apache.org/java/2_3_1/api/core/org/apache/lucene/search/MultiPhraseQuery.html
MultiPhraseQuery] in those cases.
  
  
  ==== Is the QueryParser thread-safe? ====

Mime
View raw message