Uploaded image for project: 'LLM AI Integration'
  1. LLM AI Integration
  2. LLMAI-236

A collection created through the REST API with a list of spaces never indexes the pages of those spaces

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.1
    • 0.5
    • None
    • Unknown

    Description

      Problem

      When the request that creates a collection through the collections REST API already contains a list of spaces, and the collection is then switched to the wiki pages document store, no page of those spaces is ever indexed, and nothing is logged. The pages are listed as documents of the collection, but it has no chunks. Reindexing does not help.

      The problem does not occur when the spaces are chosen in the collection's edit form, or when they are sent through the REST API to a collection that already exists.

      Steps to reproduce

      1. Send PUT /rest/wikis/xwiki/aiLLM/collections/Test for a collection that does not exist yet, with a JSON body that contains "document_spaces": ["Sandbox"].
      2. Set the documentStore property of the collection object to xwiki, for example with PUT /rest/wikis/xwiki/spaces/AI/spaces/Collections/spaces/Test/pages/WebHome/objects/AI.Collections.Code.CollectionsClass/0/properties/documentStore. The collections REST API has no field for the document store.
      3. Trigger a reindex of the collection and wait for it to finish.
      4. Open the chunks list of the collection.

      Result

      The collection has no chunks. GET /rest/wikis/xwiki/aiLLM/collections/Test/documents lists the pages of the space.

      Expected

      The pages of the space are indexed.

      Cause

      When the collection object has no list of spaces yet, the REST API stores the list in a different storage form than the one declared by the collection class and written by the edit form. The query that finds the collections a page belongs to only reads the declared form.

      Workaround

      Create the collection without document_spaces, then send the spaces in a second PUT request.

      Attachments

        Activity

          People

            ppantiru Paul Pantiru
            ppantiru Paul Pantiru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: