SpanFirstQuery is the clean option. Another option is to add a "start
token" to each title. Then, search for "startToken oil spill". This
will be faster than SpanFirstQuery. But it also requires doing
something weird to the field.

Lance

On Thu, Jun 17, 2010 at 3:19 PM, Michael McCandless
<[email protected]> wrote:
> SpanFirstQuery?
>
> Mike
>
> On Thu, Jun 17, 2010 at 3:23 PM, rakesh rakesh <[email protected]> 
> wrote:
>> Hi,
>>
>> I have thousands of article titles in lucene index. So for a query "Oil
>> spill" I want to return all the article title starts with "Oil spill". I do
>> not want those titles which has this phrase but do not start with this.
>>
>> Can anyone help me.
>>
>> Thanks in advance
>>
>> Thanks
>> rakesh
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Lance Norskog
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to