
paul_t100 at fastmail
Feb 1, 2012, 3:45 PM
Post #4 of 6
(282 views)
Permalink
|
|
Re: When does Query Parser do its analysis ?
[In reply to]
|
|
On 01/02/2012 22:03, Robert Muir wrote: > On Wed, Feb 1, 2012 at 4:32 PM, Paul Taylor<paul_t100 [at] fastmail> wrote: >> 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 ? > you are right, see this bug report: > https://issues.apache.org/jira/browse/LUCENE-2605 > I've voted on it, although reading the Hoss Mans reply I understand the issue. In my particular case I add album catalogsno to my index as a keyword field , but of course if the cat log number contains a space as they often do (i.e. cad 6) there is a mismatch. Ive now changed my indexing to index the value as 'cad6' removing spaces. Now if the query sent to the query parser is just cad 6 there is the issue that it breaks them up into two separate fields , but I thought it that if the query sent to the parser was "cad 6" then the complete string would be passed using the analyzer , but it doesn't seem to quite work, it creates a TermQuery instead of a PhraseQuery , yet the explain shows the query to have the value catno:cad 6 rather than catno:cad6 and I dont get a match, what does that mean ? Paul --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe [at] lucene For additional commands, e-mail: java-user-help [at] lucene
|