Package org.apache.lucene.facet.index.streaming

Examples of org.apache.lucene.facet.index.streaming.CategoryParentsStream


    Directory directory = newDirectory();
    TaxonomyWriter taxonomyWriter = new DirectoryTaxonomyWriter(
        directory);

    FacetIndexingParams indexingParams = new DefaultFacetIndexingParams();
    new CategoryParentsStream(new CategoryAttributesStream(
        categoryContainer), taxonomyWriter, indexingParams);

    // add DummyAttribute and retain it, three expected
    categoryContainer.clear();
    categoryContainer
        .addCategory(initialCatgeories[0], new DummyProperty());
    CategoryParentsStream stream = new CategoryParentsStream(
        new CategoryAttributesStream(categoryContainer),
        taxonomyWriter, new DefaultFacetIndexingParams());
    stream.addRetainableProperty(DummyProperty.class);

    MyCategoryListTokenizer tokenizer = new MyCategoryListTokenizer(stream,
        indexingParams);

    int nAttributes = 0;
View Full Code Here


      // Set a suitable {@link TokenStream} using
      // CategoryParentsStream, followed by CategoryListTokenizer and
      // CategoryTokenizer composition (the ordering of the last two is
      // not mandatory).
      CategoryParentsStream parentsStream = (CategoryParentsStream) getParentsStream(categoryAttributesStream);
      CategoryListTokenizer categoryListTokenizer = getCategoryListTokenizer(parentsStream);
      CategoryTokenizer stream = getCategoryTokenizer(categoryListTokenizer);

      // Finally creating a suitable field with stream and adding it to a
      // master field-list, used during the build process (see
View Full Code Here

   * @see OrdinalPolicy OrdinalPolicy (for policy of adding category tokens for parents)
   * @see PathPolicy PathPolicy (for policy of adding category <b>list</b> tokens for parents)
   */
  protected TokenStream getParentsStream(
      CategoryAttributesStream categoryAttributesStream) {
    return new CategoryParentsStream(categoryAttributesStream,
        taxonomyWriter, indexingParams);
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.index.streaming.CategoryParentsStream

Copyright © 2018 www.massapicom. 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.