Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.FullTextIndex


    public void createFullTextIndex() throws Exception {
        String sql = "CREATE TABLE test.t17 (c1 varchar(1000))";
        executeDDL(sql);
        sql = "CREATE INDEX t17_ft on test.t17 (FULL_TEXT(c1))";
        executeDDL(sql);
        FullTextIndex index = ais().getTable("test", "t17").getFullTextIndex("t17_ft");
        assertNotNull(index);
        assertNull (ais().getTable("test","t17").getIndex("t17_ft"));
    }
View Full Code Here


        String sql = "CREATE TABLE test.t17 (c1 varchar(1000), INDEX t17_ft (FULL_TEXT(c1)))";
        executeDDL(sql);
        Table table = ais().getTable("test","t17");
        assertNull (table.getIndex("t17_ft"));
        assertEquals (1, table.getFullTextIndexes().size());
        FullTextIndex index = table.getFullTextIndexes().iterator().next();
        assertNotNull (table.getFullTextIndex("t17_ft"));
    }
View Full Code Here

         */

        //CREATE INDEX cust_ft ON customers(FULL_TEXT(name, addresses.state, items.sku))

        // part 1
        FullTextIndex index = createFullTextIndex(
                                                  SCHEMA, "c", "idx_c",
                                                  "name", "i.sku", "a.state");

        RowType rowType = rowType("c");
        Row[] expected1 = new Row[]
View Full Code Here

        ftScanAndCompare(builder, "flintstone", 15, expected3);
    }

    @Test
    public void cDown() throws InterruptedException {
        FullTextIndex index = createFullTextIndex(
                                                  SCHEMA, "c", "idx_c",
                                                  "name", "i.sku", "a.state");
        RowType rowType = rowType("c");
        Row[] expected = new Row[] {
            row(rowType, 1L),
View Full Code Here

        ftScanAndCompare(builder, "state:MA", 10, expected);
    }

    @Test
    public void respondsToDropSchema() throws Exception {
        FullTextIndex index = createFullTextIndex(
                SCHEMA, "c", "idx_c",
                "name", "i.sku", "a.state");
        RowType rowType = rowType("c");
        Row[] expected = new Row[] {
                row(rowType, 1L),
View Full Code Here

        ftScanAndCompare(builder, "flintstone", 10, expected);
    }

    @Test
    public void oUpDown() throws InterruptedException {
        FullTextIndex index = createFullTextIndex(
                                                  SCHEMA, "o", "idx_o",
                                                  "c.name", "i.sku");
        RowType rowType = rowType("o");
        Row[] expected = new Row[] {
            row(rowType, 1L, 101L)
View Full Code Here

        ftScanAndCompare(builder, "name:Flintstone AND sku:1234", 10, expected);
    }

    @Test
    public void testTruncate() throws InterruptedException {
        FullTextIndex index = createFullTextIndex(SCHEMA, "c", "idx_c", "name", "i.sku", "a.state");

        final int limit = 15;
        RowType rowType = rowType("c");
        String nameQuery = "flintstone";
        Row[] nameExpected = new Row[] { row(rowType, 1L), row(rowType, 3L) };
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.FullTextIndex

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.