lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: using phrase query with wildcard
Date Sun, 22 Jul 2012 15:14:15 GMT
SpanNearQuery can be used to allow an arbitrary number of terms between 
sub-phrases of a larger phrase. But, that is between terms, not at the 
beginning or end of a phrase.

See:
http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/search/spans/SpanNearQuery.html

You can use SpanMultiTermQueryWrapper to include wild and fuzzy terms in 
your span query.

See:
http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.html

You can also use SpanPositionRangeQuery to assure that a phrase match occurs 
with a desired position range, such as to assure that the match occurs at 
the beginning, near the beginning, or end of a document.

See:
http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/search/spans/SpanPositionRangeQuery.html

-- Jack Krupansky

-----Original Message----- 
From: Levin, Ilya
Sent: Sunday, July 22, 2012 4:51 AM
To: java-user@lucene.apache.org
Subject: RE: using phrase query with wildcard

It can be both.

-----Original Message-----
From: Doron Yaacoby [mailto:dorony@gingersoftware.com]
Sent: יום א 22 יולי 2012 11:48
To: java-user@lucene.apache.org
Subject: RE: using phrase query with wildcard

Is * a placeholder for a term or a part of a term?

-----Original Message-----
From: Levin, Ilya [mailto:ilya.levin@hp.com]
Sent: 22 July 2012 11:29
To: java-user@lucene.apache.org
Subject: using phrase query with wildcard

Hi,

I'm trying to create a phrase query with wildcard, from the forums it seems 
that the solution is not trivial.
I'm trying to create the following queries: "this is a phrase*"  OR  "*This 
is a phrase" and Get hits on every possibility where the * resides.
What is the best way to achieve this?

Thanks.


---------------------------------------------------------------------
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 


---------------------------------------------------------------------
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