Package redis.seek

Examples of redis.seek.Search.run()


    public void cache() throws InterruptedException {
        addEntry("MLA98251174", 1287278019);
        Seek seek = new Seek();
        Search search = seek.search("84689862");
        search.text("title", "ipod 160");
        Result result = search.run(1, 0, 50, Order.DESC);
        Set<String> keys = jedis.keys("*:" + Seek.QUERIES_RESULT);
        assertEquals(1, result.getTotalCount());
        assertEquals(1, keys.size());
        Thread.sleep(2000);
        keys = jedis.keys("*:" + Seek.QUERIES_RESULT);
View Full Code Here


        e.save();

        Search search = seek.search("2");
        search.field("status", "active");
        search.tag("tagged");
        Result run = search.run();

        assertEquals(1, run.getTotalCount());
    }

    @Test
View Full Code Here

        Seek seek = new Seek();
        Search search = seek.search("84689862");
        search.field("category_id", "MLA31594", "MLA39056");
        search.tag("buy_it_now", "promotion");
        search.text("title", "ipod 160");
        return search.run(cache, start, end, Search.Order.DESC);
    }

    private Seek addEntry(String id, double timestamp) {
        Seek seek = new Seek();
        Entry entry = seek.add(id, timestamp);
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.