Package org.apache.solr.client.solrj.request.json

# Class HeatmapFacetMap

java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.apache.solr.client.solrj.request.json.JsonFacetMap<HeatmapFacetMap>
org.apache.solr.client.solrj.request.json.HeatmapFacetMap

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<String,Object>`

public class HeatmapFacetMap extends JsonFacetMap<HeatmapFacetMap>
Represents a "heatmap" facet in a JSON request query.

Ready for use with `JsonQueryRequest.withFacet(String, Map)`

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`HeatmapFacetMap.HeatmapFormat`

## Nested classes/interfaces inherited from class java.util.AbstractMap

`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

## Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

## Constructor Summary

Constructors
Constructor
Description
`HeatmapFacetMap(String fieldName)`

## Method Summary

Modifier and Type
Method
Description
`HeatmapFacetMap`
`getThis()`
`HeatmapFacetMap`
`setDistErr(double distErr)`
Indicates the maximum acceptable cell error distance.
`HeatmapFacetMap`
`setDistErrPct(double distErrPct)`
A fraction of the heatmap region that is used to compute the cell size.
`HeatmapFacetMap`
`setGridLevel(int individualCellSize)`
Indicates the size of each cell in the computed heatmap grid
`HeatmapFacetMap`
`setHeatmapFormat(HeatmapFacetMap.HeatmapFormat format)`
Sets the format that the computed heatmap should be returned in.
`HeatmapFacetMap`
`setRegionQuery(String queryString)`
Indicate the region to compute the heatmap facet on.
`HeatmapFacetMap`
`withSubFacet(String facetName, JsonFacetMap map)`

### Methods inherited from class org.apache.solr.client.solrj.request.json.JsonFacetMap

`withDomain, withStatSubFacet`

### Methods inherited from class java.util.HashMap

`clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

### Methods inherited from class java.util.AbstractMap

`equals, hashCode, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`equals, hashCode`

## Constructor Details

### HeatmapFacetMap

public HeatmapFacetMap(String fieldName)

## Method Details

### getThis

public HeatmapFacetMap getThis()

Specified by:
  `getThis` in class `JsonFacetMap<HeatmapFacetMap>`

### withSubFacet

public HeatmapFacetMap withSubFacet(String facetName, JsonFacetMap map)

Overrides:
  `withSubFacet` in class `JsonFacetMap<HeatmapFacetMap>`

### setRegionQuery

public HeatmapFacetMap setRegionQuery(String queryString)
Indicate the region to compute the heatmap facet on.

Defaults to the "world" ("[-180,-90 TO 180,90]")

### setGridLevel

public HeatmapFacetMap setGridLevel(int individualCellSize)
Indicates the size of each cell in the computed heatmap grid

If not set, defaults to being computed by `distErrPct` or `distErr`

Parameters:
  `individualCellSize` - the forced size of each cell in the heatmap grid
See Also:
  - `setDistErr(double)`
  - `setDistErrPct(double)`

### setDistErrPct

public HeatmapFacetMap setDistErrPct(double distErrPct)
A fraction of the heatmap region that is used to compute the cell size.

Defaults to 0.15 if not specified.

See Also:
  - `setGridLevel(int)`
  - `setDistErr(double)`

### setDistErr

public HeatmapFacetMap setDistErr(double distErr)
Indicates the maximum acceptable cell error distance.

Used to compute the size of each cell in the heatmap grid rather than specifying `setGridLevel(int)`

Parameters:
  `distErr` - a positive value representing the maximum acceptable cell error.
See Also:
  - `setGridLevel(int)`
  - `setDistErrPct(double)`

### setHeatmapFormat

public HeatmapFacetMap setHeatmapFormat(HeatmapFacetMap.HeatmapFormat format)
Sets the format that the computed heatmap should be returned in.

Defaults to 'ints2D' if not specified.