Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2300

Indexmanager doesn't find nodes that have just been created

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 4.0.0.Beta2
    • 4.0.0.Beta1
    • Query
    • None

      I've not yet created a test for this, what's happening is this:

      0: nodeType nt:x has field x indexed
      1: create node of nt:x under a parent
      2: try to find all nodes parents from same session with
      SELECT BASE.* FROM nt:unstructured AS BASE JOIN [nt:x] AS CHILD ON ISDESCENDANTNODE(CHILD,BASE) WHERE CHILD.x = $x
      3: $x is the property of the node created in step 1
      4: Indexmanager uses Index from 0 (yay), but the index doesn't contain anything about the new node yet
      5. Empty result set.

      It is only working if I add Thread.sleep(4000), anything below 4000 returns an empty result set.

      IMHO this should work without any sleep. The two places storing and searching are far apart in my code, but they are called in sequence in one particular use case. I can't pass nodes between them to use getParent(), so there should be a solution for this use case.

      Without Indexing this use case was working; slow but working.

            rhauch Randall Hauch (Inactive)
            bes82 Bjoern Schmidt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: