Package com.dotcms.repackage.org.elasticsearch.search.facet.terms.strings

Examples of com.dotcms.repackage.org.elasticsearch.search.facet.terms.strings.InternalStringTermsFacet


            Facet internalFacet = facets.get( key );

            //Verify the type of the facet in order to be able to create a proper wrapper for it
            if ( internalFacet instanceof InternalStringTermsFacet ) {

                InternalStringTermsFacet facet = (InternalStringTermsFacet) internalFacet;

                //Getting private fields values required for the proper build of the wrapper
                Integer requiredSize = (Integer) getFieldValue( InternalStringTermsFacet.class, "requiredSize", facet );
                TermsFacet.ComparatorType comparatorType = (TermsFacet.ComparatorType) getFieldValue( InternalStringTermsFacet.class, "comparatorType", facet );
                //New Instance of the wrapper for the String Facet
                internalFacet = new InternalWrapperStringTermsFacet( facet.getName(), comparatorType, requiredSize, facet.getEntries(), facet.getMissingCount(), facet.getTotalCount() );
            } else if ( internalFacet instanceof InternalCountDateHistogramFacet ) {

                InternalCountDateHistogramFacet facet = (InternalCountDateHistogramFacet) internalFacet;

                //Getting private fields values required for the proper build of the wrapper
                DateHistogramFacet.ComparatorType comparatorType = (DateHistogramFacet.ComparatorType) getFieldValue( InternalCountDateHistogramFacet.class, "comparatorType", facet );
                //New Instance of the wrapper for the Date Facet
                internalFacet = new InternalWrapperCountDateHistogramFacet( facet.getName(), comparatorType, facet.getEntries() );
            }

            internalFacets.put( key, internalFacet );
        }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.elasticsearch.search.facet.terms.strings.InternalStringTermsFacet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.