There are 2 updates.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-b1c38f02-b30f-4408-9f35-a52d2d99ae6a LLMAI-236 Open

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

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-e2e7eec4-978c-4eaa-a94f-1ae9892ec4d1 Changes by Paul Pantiru on 20/Nov/26 10:38
 
Summary: A collection whose spaces are set created through the REST API with a list of spaces never indexes any page the pages of those spaces
Description: h2. Problem
A collection When the request that indexes wiki pages and receives its list of spaces creates a collection through the collections REST API stays empty: 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 same pages are listed as documents of the collection works , 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 .

h2. Steps to reproduce
#
In the collections administration, create a collection named {{Test}} that uses the wiki pages document store, without selecting any space.
#
Send {{PUT /rest/wikis/xwiki/aiLLM/collections/Test}} for a collection that does not exist yet, with the a JSON body that contains {{ { "document_spaces": \["Sandbox"\] } }}.
#
Wait for Set the indexing {{documentStore}} property of the collection object to finish {{xwiki}} , or trigger 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.
# Trigger
a reindex of the collection and wait for it to finish .
# Open the chunks list of the collection.

h2. Result
The collection has no chunks.
The collection page shows {{GET /rest/wikis/xwiki/aiLLM/collections/Test/documents}} lists the pages of the space as selected .

h2. Expected
The pages of the space are indexed
, as when the space is selected in the edit form .

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

h2. Workaround
Create
the edit form collection without {{document_spaces}}, then send the spaces in a second {{PUT}} request .