Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1865

Update indexes only when needed

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Obsolete
    • Major
    • None
    • None
    • Embedded Querying
    • None

    Description

      // put in cache a value with 2 field, one indexed and one not indexed.
      Value value = new Value();
      value.setNonIndexedFieldValue(123);
      value.setIndexedFieldValue(456);
      cache.put("key", value);

      // later...
      // get back value from cache and update the not indexed field
      Value value = cache.get("key");
      value.setNonIndexedFieldValue(789);
      cache.put("key", value);

      The second put operation will trigger index to update even tough it hasn't changed.

      Sanne suggested :
      " Thinking about it, there might be some situations in which we can detect it, for example if the put is going to carry a valid return value then we could compare values in string form.. nice, please open an improvement request on JIRA!"

      See https://community.jboss.org/thread/195303 for complete reference

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mathieu@mathieulachance.com Mathieu Lachance (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: