yuuvis® RAD Q&A

0 votes
by (2.1k points)

Hello,

we are currently developing a process, which triggers a microservice that generates objects out of all instances of a specific documenttype.

We are using a query REST call to get all of the documents.

The problem is that we need a value of an indexfield of its parent. The only way we know of is to make a REST Call to the given uri in the "parents" field and search in the response for the required field-value pair.

For about 25.000 documents with the same parent, our process takes a little over an hour to finish. If we reduce the number of REST Calls to get the parent to one (since it's the same for all of them) this process takes about 3 minutes.

Is there a way we can figure out whether the parents of two or more objects are the same? This way we could cache the results in a map and reduce the number of REST Calls significantly. (in this example 25.000 vs 1)

Thanks for your help.

1 Answer

+1 vote
by (1.4k points)
edited by

Please check, if the parent is marked as Context folder ...

... and the field in the context folder is marked as "Use as context field"

Then you should be able, to include that field into object search.

by (2.1k points)
Yes, both are checked.

I tried searching for the objects with this call: "/rest-ws/service/result/query?type=<documenttype>&fields=<parent-context-indexfield>"
It returns an error, that the <parent-context-indexfield> is not part of  <documenttype>.

I suppose I am using the wrong API call here, but I can not find anything in the documentation right now.
by (3.3k points)
edited by
Using the dmsservice you can get the indexdata of the parent - the context folder - if you query a single object with a known id.
For example http:/HOST/rest-ws/service/dms/<ID>.json?contextfolder=true is providing the indexdata of the context folder also.
But you can currently not search documents and get the indexdata of the context folder at the same time.
But the searchservice is capable of this: If the field is market as "Use as context field" at the context folder type, all documents get also the data of the context folder.
See :  https://developer.enaio.org/display/DD/Search+Service+API
In the fields section you can just put the qualified name of the field. Like : 'bppartner.name' or to get the context folder id: contextfolderid
by (1.4k points)
It's indeed nessesary at the moment to use the hitlist in order to get childe and parent index data with the same request. The product management took over the task to think improbements and deliver with the request for a certain object by ID not only the parent ID but more information.
...