Closed joelhulen closed 6 years ago
When I pass in arguments to the ComplexArticleQuery object, they appear to be ignored. I am trying to skip duplicate articles.
ComplexArticleQuery
The ComplexArticleQuery class in query.ts appears to only set the $filter value if it is empty:
$filter
/src/query.ts#L198
if (_.isEmpty(filter)) { this.queryObj["$filter"] = filter; }
I believe this should probably be changed to:
if (!_.isEmpty(filter)) { this.queryObj["$filter"] = filter; }
This is how I'm currently passing in my arguments from my application:
const cq = new erBase.ComplexArticleQuery(combinedQueryBase, { isDuplicateFilter: 'skipDuplicates', hasDuplicateFilter: 'keepAll', eventFilter: 'keepAll' }); const q = erBase.QueryArticles.initWithComplexQuery(cq);
Despite setting isDuplicateFilter: 'skipDuplicates', I still receive duplicate articles.
isDuplicateFilter: 'skipDuplicates'
Can you please validate whether I am doing something wrong, or if this is a bug as I have outlined?
@joelhulen You are right, it is a bug. This issue is fixed with the latest version (1.0.91).
Thank you for the quick resolution! It appears to have worked :)
When I pass in arguments to the
ComplexArticleQuery
object, they appear to be ignored. I am trying to skip duplicate articles.The
ComplexArticleQuery
class in query.ts appears to only set the$filter
value if it is empty:/src/query.ts#L198
I believe this should probably be changed to:
This is how I'm currently passing in my arguments from my application:
Despite setting
isDuplicateFilter: 'skipDuplicates'
, I still receive duplicate articles.Can you please validate whether I am doing something wrong, or if this is a bug as I have outlined?