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 ra...@barclays.com on 2013/08/02 21:16:54 UTC

PhraseQuery Search

Hi,

I have been using the regular Query class to search single keywords. I needed to include hits such as "BANKER" if the user searched for "BANK". To achieve this I used "*" on both sides as *BANK*.

Now I need to search for phrases and I am building a PhraseQuery. My question is, is there a way to include hits such as "PANAMERICAN BANKER" if I search for "AMERICAN BANK"? Can it be done with something like "*AMERICAN BANK*"?

Please suggest.

Regards,
Raghu


_______________________________________________

This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer.

For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com.

_______________________________________________

RE: PhraseQuery Search

Posted by "Allison, Timothy B." <ta...@mitre.org>.
Try:
http://lucene.apache.org/core/4_4_0/queryparser/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.html 

-----Original Message-----
From: raghavendra.k.rao@barclays.com [mailto:raghavendra.k.rao@barclays.com] 
Sent: Friday, August 02, 2013 3:17 PM
To: java-user@lucene.apache.org
Subject: PhraseQuery Search

Hi,

I have been using the regular Query class to search single keywords. I needed to include hits such as "BANKER" if the user searched for "BANK". To achieve this I used "*" on both sides as *BANK*.

Now I need to search for phrases and I am building a PhraseQuery. My question is, is there a way to include hits such as "PANAMERICAN BANKER" if I search for "AMERICAN BANK"? Can it be done with something like "*AMERICAN BANK*"?

Please suggest.

Regards,
Raghu


_______________________________________________

This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer.

For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com.

_______________________________________________

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