Examples of norms()


Examples of org.apache.lucene.index.IndexReader.norms()

    for (Object field : aprioriReader.getFieldNames(IndexReader.FieldOption.ALL)) {

      // test norms as used by normal use

      byte[] aprioriNorms = aprioriReader.norms((String) field);
      byte[] testNorms = testReader.norms((String) field);

      if (aprioriNorms != null) {
        assertEquals(aprioriNorms.length, testNorms.length);

        for (int i = 0; i < aprioriNorms.length; i++) {
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

        aprioriNorms = new byte[aprioriReader.maxDoc()];
        aprioriReader.norms((String) field, aprioriNorms, 0);

        testNorms = new byte[testReader.maxDoc()];
        testReader.norms((String) field, testNorms, 0);

        assertEquals(aprioriNorms.length, testNorms.length);

        for (int i = 0; i < aprioriNorms.length; i++) {
          assertEquals("norms does not equals for field " + field + " in document " + i, aprioriNorms[i], testNorms[i]);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

        aprioriNorms = new byte[aprioriReader.maxDoc() + 10];
        aprioriReader.norms((String) field, aprioriNorms, 10);

        testNorms = new byte[testReader.maxDoc() + 10];
        testReader.norms((String) field, testNorms, 10);

        assertEquals(aprioriNorms.length, testNorms.length);
       
        for (int i = 0; i < aprioriNorms.length; i++) {
          assertEquals("norms does not equals for field " + field + " in document " + i, aprioriNorms[i], testNorms[i]);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

    }
 
    public void testFieldWithNoNorm() throws Exception {

  IndexReader r = IndexReader.open(store, false);
  byte[] norms = r.norms("nonorm");

  // sanity check, norms should all be 1
  assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
  assertNull(norms);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

  }

  // nothing should have changed
  r = IndexReader.open(store, false);
 
  norms = r.norms("nonorm");
  assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
  assertNull(norms);

  r.close();
 
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

    }
 
    public void testFieldWithNoNorm() throws Exception {

  IndexReader r = IndexReader.open(store, false);
  byte[] norms = r.norms("nonorm");

  // sanity check, norms should all be 1
  assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
  assertNull(norms);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

  }

  // nothing should have changed
  r = IndexReader.open(store, false);
 
  norms = r.norms("nonorm");
  assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
  assertNull(norms);

  r.close();
 
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

    for (Object field : aprioriReader.getFieldNames(IndexReader.FieldOption.ALL)) {

      // test norms as used by normal use

      byte[] aprioriNorms = aprioriReader.norms((String) field);
      byte[] testNorms = testReader.norms((String) field);

      if (!aprioriReader.getDisableFakeNorms()) {
        assertEquals(aprioriNorms.length, testNorms.length);

        for (int i = 0; i < aprioriNorms.length; i++) {
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

        aprioriNorms = new byte[aprioriReader.maxDoc()];
        aprioriReader.norms((String) field, aprioriNorms, 0);

        testNorms = new byte[testReader.maxDoc()];
        testReader.norms((String) field, testNorms, 0);

        assertEquals(aprioriNorms.length, testNorms.length);

        for (int i = 0; i < aprioriNorms.length; i++) {
          assertEquals("norms does not equals for field " + field + " in document " + i, aprioriNorms[i], testNorms[i]);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.norms()

        aprioriNorms = new byte[aprioriReader.maxDoc() + 10];
        aprioriReader.norms((String) field, aprioriNorms, 10);

        testNorms = new byte[testReader.maxDoc() + 10];
        testReader.norms((String) field, testNorms, 10);

        assertEquals(aprioriNorms.length, testNorms.length);
       
        for (int i = 0; i < aprioriNorms.length; i++) {
          assertEquals("norms does not equals for field " + field + " in document " + i, aprioriNorms[i], testNorms[i]);
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.