Package com.flaptor.indextank.index.storage

Examples of com.flaptor.indextank.index.storage.InMemoryStorage


            this.recoveryStorage = IndexRecoverer.IndexStorageValue.SIMPLEDB;
        }
       
        switch (storageValue) {
            case RAM:
                storage = new InMemoryStorage(baseDir, load);
                logger.info("Using in-memory storage");
                break;
            case NO:
                storage = null;
                logger.info("NOT Using storage");
View Full Code Here


    public static void main(String[] args) throws IOException {
        File dir = new File(args[0]);
        int bc = Integer.parseInt(args[1]);
        NewPopularityIndex index = new NewPopularityIndex(dir);
        InMemoryStorage ims = new InMemoryStorage(dir, true);
        DynamicDataManager ddm = new DynamicDataManager(bc, dir);
        Scanner in = new Scanner(System.in);
       
        while (in.hasNextLine()) {
            String line = in.nextLine();
            if (line.startsWith("get ")) {
                String idStr = line.substring(4);
                DocId docId = new DocId(idStr);
                System.out.println(ims.getDocument(idStr));
                Boosts boosts = ddm.getBoosts(docId);
                System.out.println("timestamp: " + boosts.getTimestamp());
                for (int i = 0; i < bc; i++) {
                    System.out.println("var["+i+"]: " + boosts.getBoost(i));
                }
View Full Code Here

    private String text;

  @Override
  protected void setUp() throws Exception {
        super.setUp();
    storage = new InMemoryStorage(FileUtil.createTempDir("testInMemoryStorage", ".tmp"), false);
    text = "The main doubt we have regarding the add-on is how should we support the service for testing environments. Currently, an IndexTank account allows you to create several indexes, either via the control panel or the api. The indextank client needs to be configured with the index code to use. Would it be ok for each Heroku user to create his own indexes and configure them for each environment on their own? or should we provide that out-of-the-box somehow";
  }
View Full Code Here

        super.tearDown();       
    }
   
    @TestInfo(testType=TestType.UNIT)
    public void testTextOnlyDocument() throws InterruptedException, IOException {
        InMemoryStorage storage = new InMemoryStorage(FileUtil.createTempDir("testInMemoryStorage", ".tmp"), false);
        Document doc1 = new Document();
        doc1.setField("text", text);
        storage.saveDocument("a", doc1);
        Document dd1 = storage.getDocument("a");
        assertEquals("document retrieved didn't match document stored", doc1, dd1);
    }
View Full Code Here

            this.recoveryStorage = IndexRecoverer.IndexStorageValue.SIMPLEDB;
        }
       
        switch (storageValue) {
            case RAM:
                storage = new InMemoryStorage(baseDir, load);
                logger.info("Using in-memory storage");
                break;
            case NO:
                storage = null;
                logger.info("NOT Using storage");
View Full Code Here

TOP

Related Classes of com.flaptor.indextank.index.storage.InMemoryStorage

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.