Hi All,

My query is on substring index working for Ignite. I am using - data grid ,
default file system persistence enabled.

Let us say, I have Organization POJO and index defined on its field as
defined below:

public class Organization {
    /** */
    private static final AtomicLong ID_GEN = new AtomicLong();

    /** Organization ID (indexed). */
    @QuerySqlField(index = true)
    private Long id;

    /** Organization name (indexed). */
    @QuerySqlField(index = true)
    private String name;
......
.....
}

let us say I have million of records for this

If I execute the following query , will the index would be applied on the
name field? How does Ignite handle the "like" based criteria like this?
What are the aspects I need to take care for the scenarios like this.

QueryCursor<List<?>> cur =
          cache.query(
              new SqlFieldsQuery(
                  "select id, name from Organization where name like ?")
                  .setArgs("organization-54%"));

      System.out.println("SQL Result: " + cur.getAll());



Thanks in advance,
Rajesh

Reply via email to