Examples of IndexManager


Examples of org.apache.activemq.kaha.impl.index.IndexManager

        }
        return dm;
    }

    public synchronized IndexManager getIndexManager(DataManager dm, String name) throws IOException {
        IndexManager im = indexManagers.get(name);
        if (im == null) {
            im = new IndexManager(directory, name, mode, logIndexChanges ? dm : null,storeSize);
            indexManagers.put(name, im);
        }
        return im;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexManager

    private void recover(final DataManager dm) throws IOException {
        dm.recoverRedoItems(new RedoListener() {
            public void onRedoItem(StoreLocation item, Object o) throws Exception {
                RedoStoreIndexItem redo = (RedoStoreIndexItem)o;
                // IndexManager im = getIndexManager(dm, redo.getIndexName());
                IndexManager im = getIndexManager(dm, dm.getName());
                im.redo(redo);
            }
        });
    }
View Full Code Here

Examples of org.apache.blur.manager.IndexManager

    indexServer.setFilterCache(filterCache);
    indexServer.setSafeModeDelay(configuration.getLong(BLUR_SHARD_SAFEMODEDELAY, 60000));
    indexServer.setWarmup(indexWarmup);
    indexServer.init();

    final IndexManager indexManager = new IndexManager();
    indexManager.setIndexServer(indexServer);
    indexManager.setMaxClauseCount(configuration.getInt(BLUR_MAX_CLAUSE_COUNT, 1024));
    indexManager.setThreadCount(configuration.getInt(BLUR_INDEXMANAGER_SEARCH_THREAD_COUNT, 32));
    indexManager.setFilterCache(filterCache);
    indexManager.setClusterStatus(clusterStatus);
    indexManager.setFetchCount(configuration.getInt(BLUR_SHARD_FETCHCOUNT, 100));
    indexManager.setMaxHeapPerRowFetch(configuration.getInt(BLUR_MAX_HEAP_PER_ROW_FETCH, 10000000));
    indexManager.init();

    final BlurShardServer shardServer = new BlurShardServer();
    shardServer.setIndexServer(indexServer);
    shardServer.setIndexManager(indexManager);
    shardServer.setZookeeper(zooKeeper);
View Full Code Here

Examples of org.apache.cocoon.components.search.components.IndexManager

            String newPublicationId, String publicationsUri) throws MalformedURLException,
            IOException, ParserConfigurationException, SAXException, SourceNotFoundException,
            TransformerConfigurationException, TransformerException, ServiceException,
            ConfigurationException {
        ModifiableSource indexSource = null;
        IndexManager indexManager = null;
        try {

            // RGE: Soc addition
            // First, patch the xconf patchfile with the new publication name

            String indexDir = "lenya/pubs/" + newPublicationId + "/work/lucene/index";

            indexSource = (ModifiableSource) resolver
                    .resolveURI(publicationsUri
                            + "/"
                            + newPublicationId
                            + "/config/"
                            + org.apache.cocoon.components.search.components.impl.IndexManagerImpl.INDEX_CONF_FILE);
            Document indexDoc = DocumentHelper.readDocument(indexSource.getInputStream());
            Element[] indexElement = DocumentHelper.getChildren(indexDoc.getDocumentElement(),
                    null, "index");

            for (int i = 0; i < indexElement.length; i++) {
                String id = indexElement[i].getAttribute("id");
                String area = id.split("-")[1];
                indexElement[i].setAttribute("id", newPublicationId + "-" + area);
                indexElement[i].setAttribute("directory", indexDir + "/" + area + "/index");
            }

            save(indexDoc, indexSource);

            // Second, configure the index and add it to the IndexManager

            indexManager = (IndexManager) manager.lookup(IndexManager.ROLE);

            indexManager.addIndexes(indexSource);

            // TODO: release all objects!

            // RGE: End Soc addition
View Full Code Here

Examples of org.apache.hadoop.hbase.index.manager.IndexManager

    if (IndexUtils.isIndexTable(userTableName)) {
      return;
    }
    LOG.trace("Entering postSplit for the table " + userTableName + " for the region "
        + region.getRegionInfo());
    IndexManager indexManager = IndexManager.getInstance();
    SplitTransaction splitTransaction = null;
    if (indexManager.getIndicesForTable(userTableName) != null) {
      try {
        SplitInfo splitInfo = splitThreadLocal.get();
        splitTransaction = splitInfo.getSplitTransaction();
        PairOfSameType<HRegion> daughters = splitInfo.getDaughters();
        if (splitTransaction != null && daughters != null) {
View Full Code Here

Examples of org.apache.roller.business.search.IndexManager

            RollerRequest rreq  = RollerRequest.getRollerRequest(request);
            WebsiteData website = rreq.getWebsite();
            RollerSession rses = RollerSession.getRollerSession(request);
           
            if (rses.isUserAuthorizedToAdmin(website) ) {
                IndexManager manager =
                        RollerFactory.getRoller().getIndexManager();
                manager.rebuildWebsiteIndex(website);
               
                ActionMessages messages = new ActionMessages();
                messages.add(null, new ActionMessage("maintenance.message.indexed"));
                saveMessages(request, messages);
            }
View Full Code Here

Examples of org.apache.roller.model.IndexManager

    }
   
   
    public void testSearch() throws Exception {
        try {
            IndexManager imgr = RollerFactory.getRoller().getIndexManager();
           
            WeblogEntryData wd1 = new WeblogEntryData();
            wd1.setId("dummy");
            wd1.setTitle("The Tholian Web");
            wd1.setText(
                    "When the Enterprise attempts to ascertain the fate of the U.S.S. "
                    +"Defiant which vanished 3 weeks ago, the warp engines begin to lose "
                    +"power, and Spock reports strange sensor readings.");
            imgr.executeIndexOperationNow(
                    new AddEntryOperation((IndexManagerImpl)imgr, wd1));
           
            WeblogEntryData wd2 = new WeblogEntryData();
            wd2.setId("dummy");
            wd2.setTitle("A Piece of the Action");
            wd2.setText(
                    "The crew of the Enterprise attempts to make contact with "
                    +"the inhabitants of planet Sigma Iotia II, and Uhura puts Kirk "
                    +"in communication with Boss Oxmyx.");
            imgr.executeIndexOperationNow(
                    new AddEntryOperation((IndexManagerImpl)imgr, wd2));
           
            SearchOperation search = new SearchOperation(imgr);
            search.setTerm("Enterprise");
            imgr.executeIndexOperationNow(search);
            assertTrue(search.getResultsCount() == 2);
           
            SearchOperation search2 = new SearchOperation(imgr);
            search2.setTerm("Tholian");
            imgr.executeIndexOperationNow(search2);
            assertTrue(search2.getResultsCount() == 1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.roller.weblogger.business.search.IndexManager

           
            try {
                // remove the entry from the search index
                // TODO: can we do this in a better way?
                entry.setStatus(WeblogEntry.DRAFT);
                IndexManager manager = WebloggerFactory.getWeblogger().getIndexManager();
                manager.addEntryReIndexOperation(entry);
            } catch (WebloggerException ex) {
                log.warn("Trouble triggering entry indexing", ex);
            }
           
            // remove from search index
View Full Code Here

Examples of org.apache.roller.weblogger.business.search.IndexManager

   
    /**
     * Trigger reindexing of modified entry.
     */
    protected void removeEntryIndex(WeblogEntry entry) {
        IndexManager manager = WebloggerFactory.getWeblogger().getIndexManager();
       
        // if published, index the entry
        if (entry.isPublished()) {
            try {
                manager.removeEntryIndexOperation(entry);
            } catch (WebloggerException ex) {
                log.warn("Trouble triggering entry indexing", ex);
            }
        }
    }
View Full Code Here

Examples of org.apache.roller.weblogger.business.search.IndexManager

     * Rebuild search index for weblog.
     */
    public String index() {
       
        try {
            IndexManager manager = WebloggerFactory.getWeblogger().getIndexManager();
            manager.rebuildWebsiteIndex(getActionWeblog());
           
            addMessage("maintenance.message.indexed");
        } catch (Exception ex) {
            log.error("Error doing index rebuild", ex);
            // TODO: i18n
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.