04-26-2019 09:14 AM
Is it possible to create a documentquery object, add a custom query, and then add individual document types to the query? For ex.
docQuery.AddCustomQuery(customQ);docQuery.AddDocumentType(docType1);docQuery.AddDocumentType(docType2);docQuery.Execute();
Is this situation valid?
And if you added keywords to this query, would the keywords need to be common across all of the document types involved?
What would happen if you added a keyword onto this query that was only assigned to one of the document types involved and is therefore not common across all document types?
04-26-2019 09:55 AM
Hi Kevin --
The answer to this would depend upon the Custom Query. What is the type of Custom Query being used in this example?
04-26-2019 09:55 AM
Hi Kevin --
The answer to this would depend upon the Custom Query. What is the type of Custom Query being used in this example?
04-26-2019 10:05 AM
What would be your answer if the custom query was either of the following two types of custom query.
By Document Type
And
By Keyword
????
04-26-2019 12:50 PM
So -- DocumentQuery objects are meant to be as inclusive as possible given their parameters. That means that anything you add to one will be included additively unless otherwise specified (as in adding a keyword to the query where the KeywordOperator is set to "NotEqual"). In either case you've described, you're likely to get different results based on the particulars of the CustomQuery you've configured, but it should not cause any errors.
An important effect of this design choice is that if you add, for instance, a document type group to a document query, and a keyword constraint that only appears on certain documents in the document type, you will get *more* results than you expect.
04-26-2019 12:19 PM
What would be your answer if the custom query was either of the following two types of custom query.
By Document Type
And
By Keyword
????
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.