/** * Adds all of the given {@link SearchClause}s to the request, ANDed with all of the existing clauses. * * @param clauses the clauses to AND with all of your other clauses * @return this request builder */ @NotNull public SearchInputsRequest ands(@NotNull SearchClause... clauses) { return ands(Arrays.asList(clauses)); }
@Test public void searchByConceptAndPrediction() { client.searchInputs() // Matches images we tagged as "cat", and that the API tagged as not having "dog" .ands( SearchClause.matchUserTaggedConcept(Concept.forName("cat")), SearchClause.matchConcept(Concept.forName("dog").withValue(false)) ) .getPage(1) .executeSync(); }
@Test public void searchANDing() { client.searchInputs() .ands( SearchClause.matchUserTaggedConcept(Concept.forName("cat")), SearchClause.matchConcept(Concept.forName("dog").withValue(false)), SearchClause.matchImageVisually(ClarifaiImage.of("@@sampleTrain")) ) .getPage(1) .executeSync(); }