On Tue, Mar 23, 2004 at 08:10:15PM -0500, Erik Hatcher wrote: > QueryParser and Field.Keyword fields are a strange mix. For some > background, check the archives as this has been covered pretty > extensively. > > A quick answer is yes you can use MFQP and QP with keyword fields, > however you need to be careful which analyzer you use. > PerFieldAnalyzerWrapper is a good solution - you'll just need to use an > analyzer for your keyword field which simply tokenizes the whole string > as one chunk. Perhaps such an analyzer should be made part of the > core? > > Erik
I've implemented suche an analyzer but it's only partial solution if your keyword field contains spaces, as the QP would split the query, e.g.: NOTTOKNIZED:(term with spaces*) would give you no hit even with an not tokenized field "term with spaces and other useful things". The full solution would be to be able to tell the QP not to split at spaces, either by 'do not split till apos' syntax, or by the good ol' backslash: do\ not\ notice\ these\ spaces. incze --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
