Disabled refinements are returned in the same way regular refinements are returned. In addition, you can identify from query output whether a particular dimension value is a disabled refinement.
In the Java API, you can identify the dimension
value with the
dgraph.DisabledRefinement
property. You can identify
the value of this property by accessing the
PropertyMap
with the
DimVal.getProperties()
method.
For example:
DimValList dvl = dimension.getRefinements(); for (int i=0; i < dvl.size(); i++) { DimVal ref = dvl.getDimValue(i); PropertyMap pmap = ref.getProperties(); // Determine whether this DimVal is a disabled refinement String disabled = ""; if (pmap.get("DGraph.DisabledRefinement") != null) { disabled = " ("+pmap.get("DGraph.DisabledRefinement")+")"; } }
In the .NET API, to determine whether a dimension value is a disabled
refinement, use the
Dimval.Properties
property to obtain the
dgraph.DisabledRefinement
property. For example:
DimValList dvl = dimension.Refinements; for (int i=0; i < dvl.Count; i++) { DimVal ref = dvl[i]; PropertyMap pmap = ref.Properties; // Determine whether this DimVal is a disabled refinement String disabled = ""; if (pmap["DGraph.DisabledRefinement"] != null) { disabled = " ("+pmap["DGraph.DisabledRefinement"]+")"; } }