
DORONC at il
Oct 15, 2006, 9:11 PM
Post #2 of 4
(363 views)
Permalink
|
Hi Antony, you cannot instruct the query parser to do that. Note that an application can add both tokenized and un_tokenized data under the same 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"); Hope this helps, Doron Antony Bowesman <adb [at] teamware> wrote on 15/10/2006 20:08:37: > Hi, > > I have a field "attname" that is indexed with Field.Store.YES, > Field.Index.UN_TOKENIZED. I have a document with the attname of > "IqTstAdminGuide2.pdf". > > QueryParser parser = new QueryParser("body", new StandardAnalyzer()); > Query query = parser.parse("attname:IqTstAdminGuide2.pdf"); > > fails to find the Document, which I guess is because of StandardAnalyzer > lowercasing the filename. > > How can one instruct the QueryParser only to use the Analyzer to > analyse fields > in an expression that were tokenized during the indexing process and to not > analyse those that were UN_TOKENIZED? > > Regards > Antony > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe [at] lucene > For additional commands, e-mail: java-user-help [at] lucene > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe [at] lucene For additional commands, e-mail: java-user-help [at] lucene
|