Package redis.seek

Examples of redis.seek.Entry


    }

    @Test
    public void searchWithTags() {
        Seek seek = new Seek();
        Entry e = seek.add("123", new Double(System.currentTimeMillis()));
        e.shardBy("seller_id");
        e.addField("seller_id", "2");
        e.addField("status", "active");
        e.addField("type", "normal");
        e.addText("title", "titulin");
        e.addTag("tagged");
        e.save();

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


        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);
        entry.addField("category_id", "MLA31594");
        entry.addField("seller_id", "84689862");
        entry.addTag("buy_it_now");
        entry.addText("title",
                "Apple Ipod Classic 160gb 160 8° Generacion 40.000 Canciones!");
        entry.shardBy("seller_id");
        entry.save();
        return seek;
    }
View Full Code Here

        Seek.configure(config, shards);

        Seek seek = new Seek();

        for (int n = 0; n < SEARCHES; n++) {
            Entry entry = seek.add(String.valueOf(n), 1287278019d);
            entry.addField("c", "MLA31594");
            entry.addField("s", "84689862");
            entry.addTag("b");
            entry
                    .addText("t",
                            "Apple Ipod Classic 160gb 160 8° Generacion 40.000 Canciones!");
            entry.shardBy("s");
            entry.save();
        }
        long start = System.nanoTime();
        for (int n = 0; n < SEARCHES; n++) {
            seek.remove(String.valueOf(n), "84689862");
        }
View Full Code Here

        Seek seek = new Seek();

        long start = System.nanoTime();

        for (int n = 0; n < SEARCHES; n++) {
            Entry entry = seek.add(String.valueOf(n), 1287278019d);
            entry.addField("c", "MLA31594");
            entry.addField("s", "84689862");
            entry.addTag("b");
            entry
                    .addText("t",
                            "Apple Ipod Classic 160gb 160 8° Generacion 40.000 Canciones!");
            entry.shardBy("s");
            entry.save();
        }
        long elapsed = System.nanoTime() - start;

        jedis.quit();
        jedis.disconnect();
View Full Code Here

TOP

Related Classes of redis.seek.Entry

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.