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 Darren Govoni <da...@ontrenet.com> on 2008/03/17 01:55:19 UTC

word position operator?

Hi,
  I want to do a query such as 

word: first*

where I want 'first' to be the start of the string value contained in the word field and not somewhere inside it.
What's the best way to do this?

thanks for any tips,
Darren

RE: word position operator?

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Darren,

Check out SpanFirstQuery and SpanRegexQuery:

<http://lucene.apache.org/java/2_3_1/api/org/apache/lucene/search/spans/SpanFirstQuery.html>

<http://lucene.apache.org/java/2_3_1/api/org/apache/lucene/search/regex/SpanRegexQuery.html>

Steve

On 03/16/2008 at 8:55 PM, Darren Govoni wrote:
> Hi,
>   I want to do a query such as
> 
> word: first*
> 
> where I want 'first' to be the start of the string value
> contained in the word field and not somewhere inside it.
> What's the best way to do this?
> 
> thanks for any tips,
> Darren
>

 


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