lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jOhn <net...@gmail.com>
Subject WordDelimiterFilter to QueryParser to MultiPhraseQuery?
Date Thu, 20 Aug 2009 18:29:27 GMT
If you have several tokens, for example after a WordDelimiterFilter, there
is almost no way NOT to trigger a MultiPhraseQuery when you have
catenateWords="1" or catenateAll="1".

For example the title: Jokers Wild

In the index it is: jokers wild, jokers, wild, jokerswild.

When you query "jOkerswild" it becomes these tokens after the
WordDelimiterFilter/LowercaseFilter:

j(0,1,positionInc=1), okerswild(1,10,positionInc=1),
jokerswild(0,10,positionInc=0)

In the QueryParser, its j=positionCount(1), okerswild=positionCount(2),
jokerswild=positionCount(2)

Thus there is no way for jokerswild to match b/c the positionCount > 1 and
QueryParser will turn that into a MultiPhraseQuery instead of a
BooleanQuery.  Even though severalTokensAtSamePosition=true (b/c
j=startOffset(0) and jokerswild=startOffset(0)).

Isn't this a bug?  How could 2 tokens at the same position be treated as a
MultiPhraseQuery?

-nc

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message