Examples of AssociationIntSumFacetRequest


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

    TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
   
    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>();
View Full Code Here

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

    TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
   
    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>();
View Full Code Here

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

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

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

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

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(aint, 10));
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(bint, 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.AssociationIntSumFacetRequest

    // category list (you'll still have one association list).
    LuceneTaxonomyReader taxo = new LuceneTaxonomyReader(taxoDir);

    // 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();
View Full Code Here

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

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

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

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

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

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

    // facet requests for two facets
    FacetSearchParams fsp = new FacetSearchParams();
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(aint, 10));
    fsp.addFacetRequest(new AssociationIntSumFacetRequest(bint, 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.AssociationIntSumFacetRequest

    // category list (you'll still have one association list).
    DirectoryTaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);

    // 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();
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.