On Fri, Mar 6, 2009 at 9:24 PM, Shyamsunder Reddy <sjh...@yahoo.com> wrote:

> I am indexing a document with field 'name'. The values of the field 'name'
> are like: Apple Corp, Apple iPod, Apple Games, Indian Apple, West Apple
> Corporation and  The Applemint Gimlet.
>
>
> Now my question is how to configure the field 'name' in my Solr
> configuration and schema, so that when I search for name:Apple.
> The query should return results all entities that contain word the 'Apple'.
> And not just words that start with 'Apple'.
> In this the expected result for the search query name:Apple are
>  Apple Corp,
>  Apple iPod,
>  Apple Games
>  Indian Apple,
>  West Apple Corporation
>  The Applemint Gimlet.
>

How is the 'name' field defined in the schema? What is the query you are
using?

I guess you'd need to index the names as text type.


> Also another requirement is to sort the results that start with Apple as:
>  Apple Corp,
>  Apple Games
>  Apple iPod,
>  Indian Apple,
>  West Apple Corporation
>  The Applemint Gimlet.
>

Use the sort parameter to your request e.g. sort=name asc

Also see http://wiki.apache.org/solr/CommonQueryParameters
-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to