Examples of RandomSirenCodec


Examples of org.sindice.siren.index.codecs.RandomSirenCodec

  /**
   * Set a new postings format for a single test
   */
  protected void setPostingsFormat(final PostingsFormatType format)
  throws IOException {
    codec = new RandomSirenCodec(random(), format);
    if (analyzer != null) {
      this.close();
      this.init();
    }
  }
View Full Code Here

Examples of org.sindice.siren.index.codecs.RandomSirenCodec

   * Set a new postings format for a single test
   * @throws IOException
   */
  protected void setPostingsFormat(final PostingsFormat format)
  throws IOException {
    codec = new RandomSirenCodec(random(), format);
    if (analyzer != null) {
      this.close();
      this.init();
    }
  }
View Full Code Here

Examples of org.sindice.siren.index.codecs.RandomSirenCodec

    RandomIndexWriter writer = null;
  }

  private static void init(final Index index)
  throws IOException {
    final RandomSirenCodec codec = new RandomSirenCodec(random(), PostingsFormatType.RANDOM);
    final TupleAnalyzer tupleAnalyzer = (TupleAnalyzer) SirenTestCase.newTupleAnalyzer();
    final AnyURIAnalyzer uriAnalyzer = new AnyURIAnalyzer(TEST_VERSION_CURRENT);
    tupleAnalyzer.registerDatatype(XSDDatatype.XSD_ANY_URI.toCharArray(), uriAnalyzer);

    // Set the SIREn fields
    codec.addSirenFields("field8", "field6", "field4", "field2", "field" + Integer.MAX_VALUE,
      "ascfield8", "ascfield6", "ascfield4", "ascfield2",
      "double8", "double6", "double4", "double2");
    // Set the datatype analyzers
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"8").toCharArray(), new LongNumericAnalyzer(8));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_LONG+"6").toCharArray(), new LongNumericAnalyzer(6));
View Full Code Here

Examples of org.sindice.siren.index.codecs.RandomSirenCodec

    RandomIndexWriter writer = null;
  }

  private static void init(final Index index)
  throws IOException {
    final RandomSirenCodec codec = new RandomSirenCodec(random(), PostingsFormatType.RANDOM);
    final TupleAnalyzer tupleAnalyzer = (TupleAnalyzer) SirenTestCase.newTupleAnalyzer();
    final AnyURIAnalyzer uriAnalyzer = new AnyURIAnalyzer(TEST_VERSION_CURRENT);
    tupleAnalyzer.registerDatatype(XSDDatatype.XSD_ANY_URI.toCharArray(), uriAnalyzer);

    // Set the SIREn fields
    codec.addSirenFields("field8", "field4", "field2", "field" + Integer.MAX_VALUE,
      "ascfield8", "ascfield4", "ascfield2",
      "float8", "float4", "float2");
    // Set the datatype analyzers
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_INT+"8").toCharArray(), new IntNumericAnalyzer(8));
    tupleAnalyzer.registerDatatype((XSDDatatype.XSD_INT+"4").toCharArray(), new IntNumericAnalyzer(4));
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.