lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Query not finding indexed data
Date Mon, 16 Oct 2006 04:11:10 GMT
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@teamware.com> 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@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message