lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elaine Li <>
Subject Re: How to retrieve the index of a string within a field?
Date Wed, 07 Oct 2009 14:19:59 GMT
Hi Sandeep,

Say the field <field name="sentence">Can you get what you
want?</field>, the field type is Text.

My query contains 'sentence:"get what you"'. Is it possible to get
number 2 directly from a query since the word 'get' is the 2nd token
in the sentence?



On Wed, Oct 7, 2009 at 8:12 AM, Sandeep Tagore <> wrote:
> Hi Elaine,
> What do you mean by "index of this word".. do you want to return the first
> occurrence of the word in that sentence or the document id.
> Also which type of field is it? is it a Text or String? If that is of type
> Text.. u can't achieve that because the sentence will be tokenized.
> Sandeep
> Elaine Li wrote:
>> I have a field. The field has a sentence. If the user types in a word
>> or a phrase, how can I return the index of this word or the index of
>> the first word of the phrase?
>> I tried to use &bf=ord..., but it does not work as i expected.
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message