Package org.apache.lucene.search

Examples of org.apache.lucene.search.FieldCache$ByteParser


    // we expect bad things, don't let tearDown complain about them
    cache.purgeAllCaches();
  }

  public void testInsanity2() throws IOException {
    FieldCache cache = FieldCache.DEFAULT;
    cache.purgeAllCaches();

    cache.getStrings(readerA, "theString");
    cache.getStrings(readerB, "theString");
    cache.getStrings(readerX, "theString");

    cache.getBytes(readerX, "theByte");


    // // //

    Insanity[] insanity =
      FieldCacheSanityChecker.checkSanity(cache.getCacheEntries());
   
    assertEquals("wrong number of cache errors", 1, insanity.length);
    assertEquals("wrong type of cache error",
                 InsanityType.SUBREADER,
                 insanity[0].getType());
    assertEquals("wrong number of entries in cache error", 3,
                 insanity[0].getCacheEntries().length);

    // we expect bad things, don't let tearDown complain about them
    cache.purgeAllCaches();
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.FieldCache$ByteParser

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.