lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: When does Query Parser do its analysis ?
Date Wed, 01 Feb 2012 23:02:12 GMT

: So it seems like it just broke the text up at spaces, and does text analysis
: within getFieldQuery(), but how can it make the assumption that text should
: only be broken at whitespace ?

whitespace is a significant metacharacter to the Queryparser - it is used 
to distinguish multiple clauses of a BooleanQuery.

if you want whitepace to be treated as a literal part of the query, you 
need to either escape it, or quote it...

  dug\ up
  "dug up"

: This seemed to be confirmed that when i pass it query 'dug/up' it just passes
: it as one string, but then its seems to get converted to 'dug up' within the
: getFieldQuery()

getFieldQuery is responsible for calling the analyzer - so in your 
'dug/up' example the analyzer you are using in your QueryParser instance 
is evidently tokenizing on "/"


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message