Sandeep,

When I submit query, i actually make sure the searched phrase is
wrapped with double quotes. When I do that, it will only return
sentences with 'get what you'. If it does not have double quotes, it
will return all the sentences as described in your email because
without double quotes, it is a 'get OR what OR you' query. I don't
know too much about the concepts behind search. I just make use of
whatever works for me. Do you think I am still ok using text as my
sentence field type?

If the return is 100 thousands of results, will Solrj's http call hung
up on it?

Thanks a lot.

Elaine

On Thu, Oct 8, 2009 at 1:31 AM, Sandeep Tagore <sandeep.tag...@gmail.com> wrote:
>
> Elaine,
> The field type text contains <tokenizer
> class="solr.WhitespaceTokenizerFactory"/> in its definition. So all the
> sentences that are indexed / queried will be split in to words. So when you
> search for 'get what you', you will get sentences containing get, what, you,
> get what, get you, what you, get what you. So when you try to find the
> indexOf of the keyword in that sentence (from results), you may not get it
> all the times.
>
> Solrj can give the results in one shot but it uses http call. You cant avoid
> it. You don't need to query multiple times with Solrj. Query once, get the
> results, store them in java beans, process it and display the results.
>
> Regards,
> Sandeep
>
>
> Elaine Li wrote:
>>
>> Sandeep, I do get results when I search for "get what you", not 0 results.
>> What in my schema makes this difference?
>> I need to learn Solrj. I am currently using javascript as a client and
>> invoke http calls to get results to display in the browser. Can Solrj
>> get all the results at one short w/o the http call? I need to do some
>> postprocessing against all the results and then display the processed
>> data. Submitting multiple http queries and post-process after each
>> query does not seem to be the right way.
>>
> --
> View this message in context: 
> http://www.nabble.com/How-to-retrieve-the-index-of-a-string-within-a-field--tp25771821p25798586.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to