Examples of FullTextIndex


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

Examples of com.foundationdb.ais.model.FullTextIndex

        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

Examples of com.foundationdb.ais.model.FullTextIndex

         */

        //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

Examples of com.foundationdb.ais.model.FullTextIndex

        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

Examples of com.foundationdb.ais.model.FullTextIndex

        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

Examples of com.foundationdb.ais.model.FullTextIndex

        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

Examples of com.foundationdb.ais.model.FullTextIndex

        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

Examples of jfix.search.FullTextIndex

  public String getSearch() {
    return search;
  }

  private void buildFullTextIndex(List<E> elements) {
    fullTextIndex = new FullTextIndex();
    int columnCount = getColumns().length;
    for (E entity : elements) {
      StringBuilder fulltext = new StringBuilder(256);
      Object[] searchValues = getSearchValues(entity);
      if (searchValues != null) {
View Full Code Here

Examples of jfix.search.FullTextIndex

        if (selectionModel.indexOf(entity) == -1) {
          choiceModel.add(entity);
        }
      }
    } else {
      FullTextIndex index = new FullTextIndex();
      for (int i = 0; i < backupModel.size(); i++) {
        Object entity = backupModel.get(i);
        if ((choiceListbox.getItemRenderer()) instanceof ItemRenderer) {
          index.add(entity, ((ItemRenderer) choiceListbox
              .getItemRenderer()).render(entity));
        } else {
          index.add(entity, String.valueOf(entity));
        }
      }
      index.commit();
      for (Object obj : index.search(searchTerm)) {
        if (selectionModel.indexOf(obj) == -1) {
          choiceModel.add(obj);
        }
      }
      choiceListbox.selectAll();
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.