Esempio n. 1
0
 /// <summary>
 /// Aggreggates float facet values from the provided
 /// <see cref="ValueSource"/>, and pulls ordinals from the
 /// provided <see cref="OrdinalsReader"/>.
 /// </summary>
 public TaxonomyFacetSumValueSource(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader,
                                    FacetsConfig config, FacetsCollector fc, ValueSource valueSource)
     : base(ordinalsReader.IndexFieldName, taxoReader, config)
 {
     this.ordinalsReader = ordinalsReader;
     SumValues(fc.GetMatchingDocs(), fc.KeepScores, valueSource);
 }
 /// <summary>
 /// Aggreggates float facet values from the provided
 /// <see cref="ValueSource"/>, and pulls ordinals from the
 /// provided <see cref="OrdinalsReader"/>. 
 /// </summary>
 public TaxonomyFacetSumValueSource(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader,
     FacetsConfig config, FacetsCollector fc, ValueSource valueSource)
     : base(ordinalsReader.IndexFieldName, taxoReader, config)
 {
     this.ordinalsReader = ordinalsReader;
     SumValues(fc.GetMatchingDocs(), fc.KeepScores, valueSource);
 }
Esempio n. 3
0
 /// <summary>
 /// Sparse faceting: returns any dimension that had any
 /// hits, topCount labels per dimension.
 /// </summary>
 public SortedSetDocValuesFacetCounts(SortedSetDocValuesReaderState state, FacetsCollector hits)
 {
     this.state = state;
     this.field = state.Field;
     dv         = state.GetDocValues();
     counts     = new int[state.Count];
     //System.out.println("field=" + field);
     Count(hits.GetMatchingDocs());
 }
 /// <summary>
 /// Create <see cref="TaxonomyFacetSumIntAssociations"/> against
 /// the specified index field. 
 /// </summary>
 public TaxonomyFacetSumIntAssociations(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(indexFieldName, taxoReader, config)
 {
     SumValues(fc.GetMatchingDocs());
 }
Esempio n. 5
0
 /// <summary>
 /// Create <see cref="TaxonomyFacetSumSingleAssociations"/> against
 /// the specified index field.
 /// </summary>
 public TaxonomyFacetSumSingleAssociations(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(indexFieldName, taxoReader, config)
 {
     SumValues(fc.GetMatchingDocs());
 }
 /// <summary>
 /// Create <see cref="RangeFacetCounts"/>, using the provided
 /// <see cref="ValueSource"/>, and using the provided Filter as
 /// a fastmatch: only documents passing the filter are
 /// checked for the matching ranges.  The filter must be
 /// random access (implement <see cref="DocIdSet.GetBits"/>). 
 /// </summary>
 public LongRangeFacetCounts(string field, ValueSource valueSource, 
     FacetsCollector hits, Filter fastMatchFilter, params LongRange[] ranges)
     : base(field, ranges, fastMatchFilter)
 {
     Count(valueSource, hits.GetMatchingDocs());
 }
Esempio n. 7
0
 /// <summary>
 /// Create <see cref="FastTaxonomyFacetCounts"/>, using the
 /// specified <paramref name="indexFieldName"/> for ordinals.  Use
 /// this if you had set <see cref="FacetsConfig.SetIndexFieldName"/>
 /// to change the index
 /// field name for certain dimensions.
 /// </summary>
 public FastTaxonomyFacetCounts(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(indexFieldName, taxoReader, config)
 {
     Count(fc.GetMatchingDocs());
 }
Esempio n. 8
0
 /// <summary>
 /// Create <see cref="TaxonomyFacetCounts"/>, which also
 /// counts all facet labels.  Use this for a non-default
 /// <see cref="OrdinalsReader"/>; otherwise use <see cref="FastTaxonomyFacetCounts"/>.
 /// </summary>
 public TaxonomyFacetCounts(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(ordinalsReader.IndexFieldName, taxoReader, config)
 {
     this.ordinalsReader = ordinalsReader;
     Count(fc.GetMatchingDocs());
 }
Esempio n. 9
0
 /// <summary>
 /// Create <see cref="Int64RangeFacetCounts"/>, using the provided
 /// <see cref="ValueSource"/>, and using the provided Filter as
 /// a fastmatch: only documents passing the filter are
 /// checked for the matching ranges.  The filter must be
 /// random access (implement <see cref="DocIdSet.Bits"/>).
 /// </summary>
 public Int64RangeFacetCounts(string field, ValueSource valueSource,
                              FacetsCollector hits, Filter fastMatchFilter, params Int64Range[] ranges)
     : base(field, ranges, fastMatchFilter)
 {
     Count(valueSource, hits.GetMatchingDocs());
 }
 /// <summary>
 /// Create <see cref="TaxonomyFacetCounts"/>, which also
 /// counts all facet labels.  Use this for a non-default
 /// <see cref="OrdinalsReader"/>; otherwise use <see cref="FastTaxonomyFacetCounts"/>. 
 /// </summary>
 public TaxonomyFacetCounts(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(ordinalsReader.IndexFieldName, taxoReader, config)
 {
     this.ordinalsReader = ordinalsReader;
     Count(fc.GetMatchingDocs());
 }
 /// <summary>
 /// Create <see cref="FastTaxonomyFacetCounts"/>, using the
 /// specified <paramref name="indexFieldName"/> for ordinals.  Use
 /// this if you had set <see cref="FacetsConfig.SetIndexFieldName"/>
 /// to change the index
 /// field name for certain dimensions. 
 /// </summary>
 public FastTaxonomyFacetCounts(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
     : base(indexFieldName, taxoReader, config)
 {
     Count(fc.GetMatchingDocs());
 }