Skip to main content
added 9 characters in body
Source Link
Bart Koopman
  • 29.6k
  • 3
  • 40
  • 90

Usually, if you have to filter on more than one criteria, you use the AndCriteriaAndCriteria or OrCriteriaOrCriteria object. This allows you to combine two or more different criteria.

You can do something like this

TaxonomyKeywordCriteria taxonomyKeywordCriteria1 = new TaxonomyKeywordCriteria(strTaxURI1, strTaxKeywordURI1, false);
TaxonomyKeywordCriteria taxonomyKeywordCriteria2 = new TaxonomyKeywordCriteria(strTaxURI2, strTaxKeywordURI2, false);

AndCriteria andCriteria = new AndCriteria(taxonomyKeywordCriteria1, taxonomyKeywordCriteria2);
myQuery.setCriteria(andCriteria);

//etc...

youYou can also combine andcriteriaAndCriteria and orcriteriaOrCriteria objects to make complex queries.

Check the documentation for an overview of all different types of Criteria objects  : http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-AC27E3C1-9E21-4664-A85B-DFAB8CB63632

Usually, if you have to filter on more than one criteria, you use the AndCriteria or OrCriteria object. This allows you to combine two or more different criteria.

You can do something like this

TaxonomyKeywordCriteria taxonomyKeywordCriteria1 = new TaxonomyKeywordCriteria(strTaxURI1, strTaxKeywordURI1, false);
TaxonomyKeywordCriteria taxonomyKeywordCriteria2 = new TaxonomyKeywordCriteria(strTaxURI2, strTaxKeywordURI2, false);

AndCriteria andCriteria = new AndCriteria(taxonomyKeywordCriteria1, taxonomyKeywordCriteria2);
myQuery.setCriteria(andCriteria);

etc...

you can also combine andcriteria and orcriteria objects to make complex queries.

Check the documentation for an overview of all different types of Criteria objects  : http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-AC27E3C1-9E21-4664-A85B-DFAB8CB63632

Usually, if you have to filter on more than one criteria, you use the AndCriteria or OrCriteria object. This allows you to combine two or more different criteria.

You can do something like this

TaxonomyKeywordCriteria taxonomyKeywordCriteria1 = new TaxonomyKeywordCriteria(strTaxURI1, strTaxKeywordURI1, false);
TaxonomyKeywordCriteria taxonomyKeywordCriteria2 = new TaxonomyKeywordCriteria(strTaxURI2, strTaxKeywordURI2, false);

AndCriteria andCriteria = new AndCriteria(taxonomyKeywordCriteria1, taxonomyKeywordCriteria2);
myQuery.setCriteria(andCriteria);

//etc...

You can also combine AndCriteria and OrCriteria objects to make complex queries.

Check the documentation for an overview of all different types of Criteria objects: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-AC27E3C1-9E21-4664-A85B-DFAB8CB63632

Source Link

Usually, if you have to filter on more than one criteria, you use the AndCriteria or OrCriteria object. This allows you to combine two or more different criteria.

You can do something like this

TaxonomyKeywordCriteria taxonomyKeywordCriteria1 = new TaxonomyKeywordCriteria(strTaxURI1, strTaxKeywordURI1, false);
TaxonomyKeywordCriteria taxonomyKeywordCriteria2 = new TaxonomyKeywordCriteria(strTaxURI2, strTaxKeywordURI2, false);

AndCriteria andCriteria = new AndCriteria(taxonomyKeywordCriteria1, taxonomyKeywordCriteria2);
myQuery.setCriteria(andCriteria);

etc...

you can also combine andcriteria and orcriteria objects to make complex queries.

Check the documentation for an overview of all different types of Criteria objects : http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-AC27E3C1-9E21-4664-A85B-DFAB8CB63632