@Override final protected Facets getFacets(final String dimension) throws IOException { if (sortedSetFacetField.equals(facetsConfig.getDimConfig(dimension).indexFieldName)) { if (queryContext.docValueReaderState == null) return null; if (queryContext.docValueReaderState.getOrdRange(dimension) == null) return null; } return results.facets; } }
@Override public FacetResult getTopChildren(int topN, String dim, String... path) throws IOException { if (topN <= 0) { throw new IllegalArgumentException("topN must be > 0 (got: " + topN + ")"); } if (path.length > 0) { throw new IllegalArgumentException("path should be 0 length"); } OrdRange ordRange = state.getOrdRange(dim); if (ordRange == null) { throw new IllegalArgumentException("dimension \"" + dim + "\" was not indexed"); } return getDim(dim, ordRange, topN); }
@Override public FacetResult getTopChildren(int topN, String dim, String... path) throws IOException { if (topN <= 0) { throw new IllegalArgumentException("topN must be > 0 (got: " + topN + ")"); } if (path.length > 0) { throw new IllegalArgumentException("path should be 0 length"); } OrdRange ordRange = state.getOrdRange(dim); if (ordRange == null) { throw new IllegalArgumentException("dimension \"" + dim + "\" was not indexed"); } return getDim(dim, ordRange, topN); }
@Override public FacetResult getTopChildren(int topN, String dim, String... path) throws IOException { if (topN <= 0) { throw new IllegalArgumentException("topN must be > 0 (got: " + topN + ")"); } if (path.length > 0) { throw new IllegalArgumentException("path should be 0 length"); } OrdRange ordRange = state.getOrdRange(dim); if (ordRange == null) { throw new IllegalArgumentException("dimension \"" + dim + "\" was not indexed"); } return getDim(dim, ordRange, topN); }
@Override final protected Facets getFacets(final String dimension) throws IOException { final String indexFieldName = facetsConfig.getDimConfig(dimension).indexFieldName; if (indexFieldName == null) return null; if (indexFieldName.equals(sortedSetFacetField)) { if (queryContext.docValueReaderState != null) if (queryContext.docValueReaderState.getOrdRange(dimension) != null) return sortedSetCounts; } else { switch (indexFieldName) { case FieldDefinition.TAXONOMY_FACET_FIELD: return taxonomyCounts; case FieldDefinition.TAXONOMY_INT_ASSOC_FACET_FIELD: return intTaxonomyCounts; case FieldDefinition.TAXONOMY_FLOAT_ASSOC_FACET_FIELD: return floatTaxonomyCounts; default: break; } } return null; } }