The nam' field defined as string. What is the best analyzer to analyze the
name field text (ie Apple Corporation or The Applemint Gimlet) into
individual tokens.
Also shall I use stored or not stored property.

<field name="NAME" type="string" indexed="true" stored="true"/>

Shalin Shekhar Mangar wrote:
> 
> 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.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Search-for-a-field-whose-value-contains-instead-of-begins-with-tp22375189p22378688.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to