You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rajesh parab <ra...@yahoo.com> on 2007/02/13 19:47:59 UTC
Double Quotes and TermQuery
Hi Everyone,
I understand that QueryParser allows searches using
double quote characters.
I was wondering if the double quote will also work
with TermQuery.
I am not using QueryParser in my application and
constructing queries (TermQuery, RangeQuery,
BooleanQuery, etc.) explicitly. But, it looks like
double quotes are not working with TermQuery.
For example:
query = new TermQuery(new Term("location", "\"san
mateo\""))
Any help/pointers will be much appreciated.
Regards,
Rajesh
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Double Quotes and TermQuery
Posted by karl wettin <ka...@gmail.com>.
13 feb 2007 kl. 19.47 skrev Rajesh parab:
> I am not using QueryParser in my application and
> constructing queries (TermQuery, RangeQuery,
> BooleanQuery, etc.) explicitly. But, it looks like
> double quotes are not working with TermQuery.
>
> For example:
> query = new TermQuery(new Term("location", "\"san
> mateo\""))
>
> Any help/pointers will be much appreciated.
Is it perhaps PhraseQuery or SpanNearQuery you are looking for?
--
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org