Examples of AssociationFloatSumFacetRequest


Examples of org.apache.lucene.facet.associations.AssociationFloatSumFacetRequest

   
    CategoryPath tags = new CategoryPath("tags");
    CategoryPath genre = new CategoryPath("genre");
    FacetSearchParams fsp = new FacetSearchParams(
        new AssociationIntSumFacetRequest(tags, 10),
        new AssociationFloatSumFacetRequest(genre, 10));
 
    // every category has a different type of association, so use chain their
    // respective aggregators.
    final Map<CategoryPath,FacetsAggregator> aggregators = new HashMap<CategoryPath,FacetsAggregator>();
    aggregators.put(tags, new SumIntAssociationFacetsAggregator());
View Full Code Here

Examples of org.apache.lucene.facet.associations.AssociationFloatSumFacetRequest

   
    CategoryPath tags = new CategoryPath("tags");
    CategoryPath genre = new CategoryPath("genre");
    FacetSearchParams fsp = new FacetSearchParams(
        new AssociationIntSumFacetRequest(tags, 10),
        new AssociationFloatSumFacetRequest(genre, 10));
 
    // every category has a different type of association, so use chain their
    // respective aggregators.
    final Map<CategoryPath,FacetsAggregator> aggregators = new HashMap<CategoryPath,FacetsAggregator>();
    aggregators.put(tags, new SumIntAssociationFacetsAggregator());
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

      Directory taxoDir) throws Exception {
    // prepare index reader
    IndexReader indexReader = IndexReader.open(indexDir);
    TaxonomyReader taxo = new LuceneTaxonomyReader(taxoDir);
   
    AssociationFloatSumFacetRequest facetRequest = new AssociationFloatSumFacetRequest(
        new CategoryPath("genre"), 10);
   
    List<FacetResult> res = SimpleSearcher.searchWithRequest(indexReader, taxo,
        AssociationUtils.assocIndexingParams, facetRequest);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

  public void testFloatSumAssociation() throws Exception {
    LuceneTaxonomyReader taxo = new LuceneTaxonomyReader(taxoDir);

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(afloat, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(bfloat, 10));
   
    Query q = new MatchAllDocsQuery();

    FacetsCollector fc = new FacetsCollector(fsp, reader, taxo);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(aint, 10));
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(bint, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(afloat, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(bfloat, 10));
   
    Query q = new MatchAllDocsQuery();

    FacetsCollector fc = new FacetsCollector(fsp, reader, taxo);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

      Directory taxoDir) throws Exception {
    // prepare index reader
    IndexReader indexReader = IndexReader.open(indexDir);
    TaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);
   
    AssociationFloatSumFacetRequest facetRequest = new AssociationFloatSumFacetRequest(
        new CategoryPath("genre"), 10);
   
    List<FacetResult> res = SimpleSearcher.searchWithRequest(indexReader, taxo,
        AssociationUtils.assocIndexingParams, facetRequest);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

      Directory taxoDir) throws Exception {
    // prepare index reader
    IndexReader indexReader = DirectoryReader.open(indexDir);
    TaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);
   
    AssociationFloatSumFacetRequest facetRequest = new AssociationFloatSumFacetRequest(
        new CategoryPath("genre"), 10);
   
    List<FacetResult> res = SimpleSearcher.searchWithRequest(indexReader, taxo,
        AssociationUtils.assocIndexingParams, facetRequest);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

  public void testFloatSumAssociation() throws Exception {
    DirectoryTaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(afloat, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(bfloat, 10));
   
    Query q = new MatchAllDocsQuery();

    FacetsCollector fc = new FacetsCollector(fsp, reader, taxo);
   
View Full Code Here

Examples of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(aint, 10));
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(bint, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(afloat, 10));
    fsp.addFacetRequest(new AssociationFloatSumFacetRequest(bfloat, 10));
   
    Query q = new MatchAllDocsQuery();

    FacetsCollector fc = new FacetsCollector(fsp, reader, taxo);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.