On 5/12/10 11:24 AM, Robert Muir wrote:
On Wed, May 12, 2010 at 11:16 AM, Mark Miller<markrmil...@gmail.com> wrote:
Thats a major exaggeration - quoting text plays a large role in whether or
not you will get a phrase query.
No, it has nothing to do with it in the implementation. It only
"escapes the whitespace", but is discarded. This is clear from looking
at the grammar.
The logic then to determine if you get a phrase query is the huge mess
of code in getFieldQuery, but its not based on the double quotes at
all.
For example a list of chinese or thai words gets a phrase query, only
because they don't use whitespace between words.
But a similar list of english words gets a boolean query.
Quotes play a part, or quoting something would simply not create a
phrase query - quoting something ensures that it hits the analyzer as
one chunk, rather than getting meta parsed by the grammar and fed to the
analyzer a token at a time. This ensures that multiple tokens hit the
funky logic to create a phrase query. The grammar specifically looks for
quoted chunks.
--
- Mark
http://www.lucidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org