Hello!

As you can is in the http://wiki.apache.org/solr/SchemaXml#Copy_Fields
the actual copying is done before analysis and indexing, so it doesn't
matter if you store fields you use as source for your copy fields.      

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

> Dear All,

> I have a question on the CopyField directive in schema.xml.

> *Background:*
> Each record will have various types of titles say product_title,
> actual_title, user_title, working_title.

> <field name="product_title" type="text" indexed="true" stored="true"
> multiValued="false" />
> <field name="actual_title" type="text" indexed="true" stored="true"
> multiValued="false" />
> <field name="user_title" type="text" indexed="true" stored="true"
> multiValued="false" />
> <field name="working_title" type="text" indexed="true" stored="true"
> multiValued="false" />

> All the above fields are searchable as well as need to be returned as part
> of the search response hence indexed=true and stored=true is implemented.

> There is an additional requirement to search against user and working title
> and hence there is a composite field created called 'group_title'

> <field name="group_title" type="text" indexed="true" stored="false"
> multiValued="true" />

> <copyField source="user_title " dest="group_title" />
> <copyField source="working_title" dest="group_title" />

> The group title need not be part of the search response, hence stored=false
> is implemented.

> Further, there is a requirement to search against all these titles for
> which a composite field that copies from all these fields is defined as
> 'titles'

> <field name="titles" type="text" indexed="true" stored="false"
> multiValued="true" />

> <copyField source="product_title" dest="titles" />
> <copyField source="actual_title" dest="titles" />
> *<copyField source="group_title" dest="titles" />*
> *
> *
> If you see above, instead of copying the individual fields to the titles,
> the group_title created above is copied to titles.
> My question is, because group_title is designed to be stored=false, will
> the above underlined code copy the content of 'group_title' to 'titles' or
> not?

> Many Thanks in advance,
> Sandeep

Reply via email to