public class SimpleJahiaJcrFacets extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.lucene.analysis.Analyzer |
defaultAnalyzer |
protected org.apache.lucene.util.OpenBitSet |
docs
The main set of documents all facet counts should be relative to
|
protected org.apache.solr.common.util.SimpleOrderedMap<Object> |
facetResponse |
Date |
NOW |
protected org.apache.solr.common.params.SolrParams |
params
Configuration params behavior should be driven by
|
static org.apache.lucene.document.FieldSelector |
PARENT_AND_TRANSLATION_FIELDS |
static String |
PROPNAME_INDEX_SEPARATOR |
protected org.apache.solr.handler.component.ResponseBuilder |
rb |
protected org.apache.solr.common.params.SolrParams |
required |
protected org.apache.jackrabbit.spi.commons.conversion.NamePathResolver |
resolver
Name and Path resolver.
|
protected org.apache.lucene.search.IndexSearcher |
searcher
Searcher to use for all calculations
|
protected javax.jcr.Session |
session
Name and Path resolver.
|
static org.apache.lucene.document.FieldSelector |
TRANSLATION_FIELDS |
| Constructor and Description |
|---|
SimpleJahiaJcrFacets(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
org.apache.solr.common.params.SolrParams params,
org.apache.jackrabbit.core.query.lucene.SearchIndex index,
javax.jcr.Session session,
org.apache.jackrabbit.core.query.lucene.NamespaceMappings nsMappings) |
| Modifier and Type | Method and Description |
|---|---|
void |
addException(String msg,
Exception e) |
org.apache.lucene.util.OpenBitSet |
getDocIdSet(List<org.apache.lucene.search.Query> queries,
String locale)
Returns the set of document ids matching all queries.
|
org.apache.solr.common.util.NamedList<Object> |
getFacetCounts()
Looks at various Params to determing if any simple Facet Constraint count computations are desired.
|
org.apache.solr.common.util.NamedList<Object> |
getFacetDateCounts()
Deprecated.
Use getFacetRangeCounts which is more generalized
|
void |
getFacetDateCounts(String dateFacet,
org.apache.solr.common.util.NamedList<Object> resOuter)
Deprecated.
Use getFacetRangeCounts which is more generalized
|
org.apache.solr.common.util.NamedList<Object> |
getFacetFieldCounts()
Returns a list of value constraints and the associated facet counts for each facet field specified in the params.
|
org.apache.solr.common.util.NamedList<Object> |
getFacetQueryCounts()
Returns a list of facet counts for each of the facet queries specified in the params
|
org.apache.solr.common.util.NamedList<Object> |
getFacetRangeCounts()
Returns a list of value constraints and the associated facet
counts for each facet numerical field, range, and interval
specified in the SolrParams
|
org.apache.solr.common.util.NamedList<Object> |
getFacetTermEnumCounts(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
String field,
String fieldName,
int offset,
int limit,
int mincount,
boolean missing,
String sort,
String prefix,
String locale,
ExtendedPropertyDefinition epd)
Returns a list of terms in the specified field along with the corresponding count of documents in the set that match that constraint.
|
org.apache.solr.common.util.NamedList<Object> |
getFieldCacheCounts(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
String fieldName,
int offset,
int limit,
int mincount,
boolean missing,
String sort,
String prefix,
String locale,
ExtendedPropertyDefinition epd)
Use the Lucene FieldCache to get counts for each unique field value in
docs. |
int |
getFieldMissingCount(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
String fieldName,
String locale)
Returns a count of the documents in the set which do not have any terms for for the specified field.
|
String |
getFieldNameInIndex(String field,
String propertyFieldName,
ExtendedPropertyDefinition epd,
String langCode) |
org.apache.solr.common.util.NamedList<Object> |
getTermCounts(String field,
ExtendedPropertyDefinition epd,
String fieldNameInIndex,
String locale) |
int |
maxDoc() |
protected int |
rangeCount(org.apache.lucene.search.Query rangeQuery)
Macro for getting the numDocs of a ConstantScoreRangeQuery over docs
|
protected int |
rangeCount(org.apache.solr.schema.SchemaField sf,
Date low,
Date high,
boolean iLow,
boolean iHigh)
Deprecated.
Use rangeCount(SchemaField,String,String,boolean,boolean) which is more generalized
|
protected int |
rangeCount(org.apache.solr.schema.SchemaField sf,
String low,
String high,
boolean iLow,
boolean iHigh)
Macro for getting the numDocs of range over docs
|
public static final String PROPNAME_INDEX_SEPARATOR
protected org.apache.lucene.util.OpenBitSet docs
protected org.apache.solr.common.params.SolrParams params
protected org.apache.solr.common.params.SolrParams required
protected org.apache.lucene.search.IndexSearcher searcher
protected org.apache.solr.handler.component.ResponseBuilder rb
protected org.apache.solr.common.util.SimpleOrderedMap<Object> facetResponse
public final Date NOW
protected org.apache.lucene.analysis.Analyzer defaultAnalyzer
protected final org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver
protected final javax.jcr.Session session
public static final org.apache.lucene.document.FieldSelector PARENT_AND_TRANSLATION_FIELDS
public static final org.apache.lucene.document.FieldSelector TRANSLATION_FIELDS
public SimpleJahiaJcrFacets(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
org.apache.solr.common.params.SolrParams params,
org.apache.jackrabbit.core.query.lucene.SearchIndex index,
javax.jcr.Session session,
org.apache.jackrabbit.core.query.lucene.NamespaceMappings nsMappings)
public org.apache.solr.common.util.NamedList<Object> getFacetCounts()
getFacetQueryCounts(),
getFacetFieldCounts(),
getFacetDateCounts(),
FacetParams.FACETpublic org.apache.solr.common.util.NamedList<Object> getFacetQueryCounts() throws IOException, org.apache.lucene.queryParser.ParseException
IOExceptionorg.apache.lucene.queryParser.ParseExceptionFacetParams.FACET_QUERYpublic org.apache.solr.common.util.NamedList<Object> getTermCounts(String field, ExtendedPropertyDefinition epd, String fieldNameInIndex, String locale) throws IOException, javax.jcr.RepositoryException
IOExceptionjavax.jcr.RepositoryExceptionpublic org.apache.solr.common.util.NamedList<Object> getFacetFieldCounts() throws IOException
IOExceptionFacetParams.FACET_FIELD,
getFieldMissingCount(org.apache.lucene.search.IndexSearcher, org.apache.lucene.util.OpenBitSet, java.lang.String, java.lang.String),
getFacetTermEnumCounts(org.apache.lucene.search.IndexSearcher, org.apache.lucene.util.OpenBitSet, java.lang.String, java.lang.String, int, int, int, boolean, java.lang.String, java.lang.String, java.lang.String, org.jahia.services.content.nodetypes.ExtendedPropertyDefinition)public int getFieldMissingCount(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.util.OpenBitSet docs,
String fieldName,
String locale)
throws IOException
IOExceptionFacetParams.FACET_MISSINGpublic org.apache.solr.common.util.NamedList<Object> getFieldCacheCounts(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.OpenBitSet docs, String fieldName, int offset, int limit, int mincount, boolean missing, String sort, String prefix, String locale, ExtendedPropertyDefinition epd) throws IOException
docs. The field must have at most one indexed
token per document.IOExceptionpublic org.apache.solr.common.util.NamedList<Object> getFacetTermEnumCounts(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.OpenBitSet docs, String field, String fieldName, int offset, int limit, int mincount, boolean missing, String sort, String prefix, String locale, ExtendedPropertyDefinition epd) throws IOException
docs and the DocSet for each term in the filter.IOExceptionFacetParams.FACET_LIMIT,
FacetParams.FACET_ZEROS,
FacetParams.FACET_MISSINGpublic String getFieldNameInIndex(String field, String propertyFieldName, ExtendedPropertyDefinition epd, String langCode)
@Deprecated public org.apache.solr.common.util.NamedList<Object> getFacetDateCounts() throws JahiaException, IOException, javax.jcr.RepositoryException
JahiaExceptionIOExceptionjavax.jcr.RepositoryExceptionFacetParams.FACET_DATE@Deprecated public void getFacetDateCounts(String dateFacet, org.apache.solr.common.util.NamedList<Object> resOuter) throws IOException, org.apache.lucene.queryParser.ParseException, javax.jcr.RepositoryException, JahiaException
IOExceptionorg.apache.lucene.queryParser.ParseExceptionjavax.jcr.RepositoryExceptionJahiaExceptionpublic org.apache.solr.common.util.NamedList<Object> getFacetRangeCounts()
FacetParams.FACET_RANGEprotected int rangeCount(org.apache.solr.schema.SchemaField sf,
String low,
String high,
boolean iLow,
boolean iHigh)
throws IOException
IOExceptionSolrIndexSearcher.numDocs(org.apache.lucene.search.Query, org.apache.solr.search.DocSet),
TermRangeQuery@Deprecated protected int rangeCount(org.apache.solr.schema.SchemaField sf, Date low, Date high, boolean iLow, boolean iHigh) throws IOException
IOExceptionprotected int rangeCount(org.apache.lucene.search.Query rangeQuery)
throws IOException
IOExceptionpublic org.apache.lucene.util.OpenBitSet getDocIdSet(List<org.apache.lucene.search.Query> queries, String locale) throws IOException
The DocSet returned should not be modified.
IOExceptionpublic int maxDoc()
throws IOException
IOExceptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.