On Oct 16, 2006, at 2:44 AM, Antony Bowesman wrote:
Doron Cohen wrote:
Hi Antony, you cannot instruct the query parser to do that. Note
that an
Thanks, I suspected as much. I've changed it to make the field
tokenized.
field name. This is an application logic to know that a certain
query is
not to be tokenized. In this case you could create your query with:
query = new TermQuery(fieldName, "IqTstAdminGuide2.pdf");
The query is user driven, so I can't know without parsing whether
it should be tokenised or not. I would have to extend the parser
to make use of TermQuery - it's easier just to tokenize the field
now I understand Lucene's behaviour.
You can also use PerFieldAnalyzerWrapper as the analyzer for
QueryParser, and for all your untokenized fields, specify a
KeywordAnalyzer. That will keep untokenized fields from being split
(as best it can given QueryParser meta-syntax).
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]