Package org.apache.lucene.facet.index.attributes

Examples of org.apache.lucene.facet.index.attributes.OrdinalProperty


    this.categoryAttribute = this.addAttribute(CategoryAttribute.class);
    this.taxonomyWriter = taxonomyWriter;
    this.pathPolicy = indexingParams.getPathPolicy();
    this.ordinalPolicy = indexingParams.getOrdinalPolicy();
    this.ordinalPolicy.init(taxonomyWriter);
    this.ordinalProperty = new OrdinalProperty();
   
  }
View Full Code Here


      if (categoryAttribute != null) {
        AssociationProperty associationProperty = AssociationEnhancement
            .getAssociationProperty(categoryAttribute);
        if (associationProperty != null
            && associationProperty.hasBeenSet()) {
          OrdinalProperty ordinalProperty = (OrdinalProperty) categoryAttribute
              .getProperty(OrdinalProperty.class);
          if (ordinalProperty == null) {
            throw new IOException(
                "Error: Association without ordinal");
          }

          if (payloadStream == null) {
            payloadStream = new CategoryListPayloadStream(
                new SimpleIntEncoder());
          }
          payloadStream.appendIntToStream(ordinalProperty
              .getOrdinal());
          payloadStream.appendIntToStream(associationProperty
              .getAssociation());
        }
      }
View Full Code Here

  @Override
  public final boolean incrementToken() throws IOException {
    if (input.incrementToken()) {
      if (this.categoryAttribute != null) {
        OrdinalProperty ordinalProperty = (OrdinalProperty) this.categoryAttribute
            .getProperty(OrdinalProperty.class);
        if (ordinalProperty != null && legalCategory()) {
          CategoryPath categoryPath = this.categoryAttribute
              .getCategoryPath();
          int ordinal = ordinalProperty.getOrdinal();
          CategoryListPayloadStream payloadStream = getPayloadStream(
              categoryPath, ordinal);
          int partitionSize = indexingParams.getPartitionSize();
          payloadStream.appendIntToStream(ordinal % partitionSize);
        }
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.index.attributes.OrdinalProperty

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.