Class FacetView
- All Implemented Interfaces:
BoxConfigurable
,BoxDatabase
,Harvester
,Processor
,ReadOnlyDatabase
NOTE: when using the builder, you will need to make sure that @box.facets
is
included in the field projection.
IMPORTANT: FacetView
has some weaknesses. First, you cannot force the process of
upstream documents based on a facet. A facet is one-way. Documents get tagged with a facet once
they've been processed another way. Second, when a document drops its facet value recognized by
this view, it is impossible to know which group it once belonged to in order to signal the
reprocess of the group. Therefore it is good practice to occasionally reprocess documents
dependent on this view. Third, all documents corresponding to a facet id are brought in. If there
are many many documents per facet id, the resulting facet documents could be too large to fit in
memory. Set the documentLimit
in this case.
- Author:
- Charles Draper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
FacetView.FacetViewBuilder<C extends FacetView,
B extends FacetView.FacetViewBuilder<C, B>> Builder forFacetView
.Nested classes/interfaces inherited from class edu.byu.hbll.box.impl.View
View.ViewBuilder<C extends View,
B extends View.ViewBuilder<C, B>> -
Constructor Summary
ConstructorDescriptionFacetView
(AbstractHttpBoxClient boxClient, String facetName) Deprecated.user builderFacetView
(ConstructConfig constructConfig, InitConfig initConfig) Deprecated.user builder -
Method Summary
Modifier and TypeMethodDescriptionvoid
postConstruct
(ConstructConfig config) Called when Box constructs a new instance of the class.void
postInit
(InitConfig config) Called after Box is completely initialized.Same asView.find(BoxQuery)
except it does not perform any transformation other than applying the preconfigured `fields`, `facets`, and `statuses`.Methods inherited from class edu.byu.hbll.box.impl.View
find, getLocal, getSource, getUri, harvest, process, setBoxClient, setFacets, setFields, setHarvestForView, setHarvestUnprocessed, setLimit, setSourceName, setStatuses, transform, transform
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.byu.hbll.box.BoxConfigurable
preDestroy
Methods inherited from interface edu.byu.hbll.box.BoxDatabase
addToQueue, count
Methods inherited from interface edu.byu.hbll.box.ReadOnlyDatabase
addToQueue, addToQueue, addToQueue, clear, deleteFromQueue, findDependencies, findDependents, findRegistryValue, getHarvestCursor, listSourceDependencies, nextFromQueue, processOrphans, removeDeleted, save, saveRegistryValue, setHarvestCursor, startGroup, updateDependencies, updateProcessed
-
Constructor Details
-
FacetView
Deprecated.user builderCreates a newFacetView
with the given box client and facet to use.- Parameters:
boxClient
- the client for communicating with the remote boxfacetName
- the facet group name to use as the id for documents
-
FacetView
Deprecated.user builder- Parameters:
constructConfig
- the construct config to useinitConfig
- the init config to use
-
-
Method Details
-
postConstruct
Description copied from class:View
Called when Box constructs a new instance of the class.uri: base URI for the box instance, the path should end with /box or a specific source /SOURCE_NAME (required if local is also null)
local: source name for underlying local source, uri is ignored if this is set.
fields: array of the particular fields to return for each document (optional)
statuses: only include documents with these statuses. Default: [READY,DELETED] (optional)
facets: filter to these collections only, key value pairs in the form of "name:value" (optional)
limit: limit of documents per request (optional)
username: username to use with basic authentication. (optional)
password: password to use with basic authentication. (optional)
- Specified by:
postConstruct
in interfaceBoxConfigurable
- Overrides:
postConstruct
in classView
- Parameters:
config
- configuration for this client.
-
postInit
Description copied from interface:BoxConfigurable
Called after Box is completely initialized.- Specified by:
postInit
in interfaceBoxConfigurable
- Overrides:
postInit
in classView
- Parameters:
config
- configuration for this client.
-
rawFind
Description copied from class:View
Same asView.find(BoxQuery)
except it does not perform any transformation other than applying the preconfigured `fields`, `facets`, and `statuses`.
-