Package com.flaptor.indextank.storage.alternatives

Examples of com.flaptor.indextank.storage.alternatives.IndexStorage


        TSocket transport = new TSocket(indexServerHost, indexServerPort + 1);
        TProtocol protocol = new TBinaryProtocol(transport);
        client = new Indexer.Client(protocol);
        try {
            transport.open();
            IndexStorage storage = getStorage();
            logger.debug("Using environment: " + environment);
            Iterable<Pair<String, BoostedDocument>> allDocuments = storage.getAllDocuments(true, timestamp);
            logger.info("Starting recovery.");
            if (ie != null) ie.setStatus(IndexerStatus.recovering);
            int recovered = 0;
            for (Pair<String, BoostedDocument> pair : allDocuments) {
                logger.debug("Document found!");
View Full Code Here


        TSocket transport = new TSocket(indexServerHost, indexServerPort + 1);
        TProtocol protocol = new TBinaryProtocol(transport);
        client = new Indexer.Client(protocol);
        try {
            transport.open();
            IndexStorage storage = getStorage();
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in), 200);
            String docId;
            System.out.println("Enter the document Ids to recover, separated by enters.\nHit ctr-d to end.");
            while ((docId = in.readLine()) != null && docId.length() != 0) {
                BoostedDocument doc;
                try {
                    doc = storage.getDocument(docId, false);
                } catch (NullPointerException e) {
                    System.out.println("document " + docId + " is not in the storage.\nDELETING DOCUMENT.");
                    client.delDoc(docId);
                    continue;
                }
View Full Code Here

TOP

Related Classes of com.flaptor.indextank.storage.alternatives.IndexStorage

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.