You're copying the "id" field rather than "description" into "ng_text". Try:
<copyField source="description" dest="ng_text"/>

Best
Erick

On Fri, Mar 11, 2011 at 1:11 AM, nidhi gupta <wdnidhigu...@yahoo.co.in> wrote:
> I want to implement type ahead styling feature for description field.For that 
> I defined ngtext fieldtype.I indexed
>
> description as text and then using copyfield indexed into ngtext field.But I 
> found out that it is not working.
> If I put ngtext directly as a field type value without using copyfield it is 
> working fine.
> I am not able to understand the reason behind it?
>
> <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>       <analyzer type="index">
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>         <filter class="solr.StopFilterFactory" ignoreCase="true" 
> words="stopwords.txt"
>
> enablePositionIncrements="true" />
>        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
> generateNumberParts="1"
>
> catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>       </analyzer>
>       <analyzer type="query">
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>         <filter class="solr.StopFilterFactory" ignoreCase="true" 
> words="stopwords.txt"
>
> enablePositionIncrements="true" />
>         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
> generateNumberParts="1"
>
> catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>       </analyzer>
>     </fieldType>
> <fieldType name="ngtext" class="solr.TextField" positionIncrementGap="100">
>         <analyzer type="index">
>             <tokenizer class="solr.KeywordTokenizerFactory"/>
>                         <filter class="solr.LowerCaseFilterFactory"/>
>             <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" 
> maxGramSize="50"/>
>         </analyzer>
>         <analyzer type="query">
>             <tokenizer class="solr.KeywordTokenizerFactory"/>
>             <filter class="solr.LowerCaseFilterFactory"/>
>         </analyzer>
>     </fieldType>
> <field name="description" type="text" indexed="true" stored="true" />
> <copyField source="id" dest="ng_text"/>
>
>
>
>

Reply via email to