0

I want to create a custom field to be indexed in Lucene that has the children of the item being indexed. Is there an easy way to do this that I am overlooking?

1 Answer 1

5

According to your requirement, you should look into creating a custom computed index field.

This community article by John West describes the process of adding a custom computed field in details: https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/sitecore-7-computed-index-fields

Basically, all you have to do is to define a computed index field, with your custom logic in the ComputeFieldValue method (in your case -> iterate through item's children and collect all you need, e.g. names, etc.)

The above article gives an example for Sitecore 7+, but in Sitecore 8+ the process is not very different

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.