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?

Thanks.

Elaine

On Wed, Oct 7, 2009 at 8:12 AM, Sandeep Tagore <sandeep.tag...@gmail.com> 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: 
> http://www.nabble.com/How-to-retrieve-the-index-of-a-string-within-a-field--tp25771821p25783936.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to