Package com.gentics.cr.lucene.indexaccessor

Examples of com.gentics.cr.lucene.indexaccessor.IndexAccessorFactory


  private Directory loadDirectory(final String indexLocation, final CRConfig config) {
    Directory dir = createDirectory(indexLocation, config);

    //Create index accessor
    IndexAccessorFactory factory = IndexAccessorFactory.getInstance();
    if (!factory.hasAccessor(dir)) {
      try {
        factory.createAccessor(dir, getConfiguredAnalyzer());
      } catch (IOException ex) {
        log.fatal("COULD NOT CREATE INDEX ACCESSOR" + ex.getMessage());
      }
    } else {
      log.debug("Accessor already present. we will not create a new one.");
View Full Code Here


    return dir;
  }

  @Override
  protected IndexAccessor getAccessorInstance() {
    IndexAccessorFactory factory = IndexAccessorFactory.getInstance();
    return factory.getMultiIndexAccessor(this.dirs.values().toArray(new Directory[] {}));
  }
View Full Code Here

  public LuceneSingleIndexLocation(final CRConfig config) {
    super(config);
    indexLocation = getFirstIndexLocation(config);
    dir = createDirectory(indexLocation, config);
    //Create index accessor
    IndexAccessorFactory iAFactory = IndexAccessorFactory.getInstance();
    if (!iAFactory.hasAccessor(dir)) {
      try {
        iAFactory.createAccessor(dir, getConfiguredAnalyzer());
      } catch (IOException ex) {
        log.fatal("COULD NOT CREATE INDEX ACCESSOR" + ex.getMessage());
      }
    } else {
      log.debug("Accessor already present.");
View Full Code Here

TOP

Related Classes of com.gentics.cr.lucene.indexaccessor.IndexAccessorFactory

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.