Example usage for org.apache.solr.common SolrInputField deepCopy

List of usage examples for org.apache.solr.common SolrInputField deepCopy

Introduction

In this page you can find the example usage for org.apache.solr.common SolrInputField deepCopy.

Prototype

public SolrInputField deepCopy() 

Source Link

Usage

From source file:org.craftercms.search.service.impl.DenormalizingPostProcessor.java

License:Open Source License

protected Collection<SolrInputField> getChildrenFields(Collection<SolrInputDocument> childDocs) {
    Map<String, SolrInputField> childrenFields = new LinkedHashMap<>();

    for (SolrInputDocument childDoc : childDocs) {
        for (SolrInputField field : childDoc) {
            String fieldName = field.getName();
            if (!ArrayUtils.contains(fieldsToIgnore, fieldName)) {
                if (childrenFields.containsKey(fieldName)) {
                    childrenFields.get(fieldName).addValue(field.getValue(), field.getBoost());
                } else {
                    childrenFields.put(fieldName, field.deepCopy());
                }/*w  w  w.ja v  a  2s  .com*/
            }
        }
    }

    return childrenFields.values();
}