@Retry @Test public void t17a_searchInputsWithModel() { assertSuccess(client.searchInputs( SearchClause.matchImageURL(ClarifaiImage.of(METRO_NORTH_IMAGE_URL)) )); }
@Test public void searchMatchURL() { // Lookup images with this URL client.searchInputs(SearchClause.matchImageURL(ClarifaiImage.of(""))) .getPage(1) .executeSync(); }
@Retry @Test public void t17d_searchInputsWithModel_multi_language() { assertSuccess(client.searchInputs( SearchClause.matchImageURL(ClarifaiImage.of(METRO_NORTH_IMAGE_URL))).withLanguage("zh")); }
@Retry @Test public void t17b_searchInputsWithModel_complexSearch() { assertSuccess( client.searchInputs(matchConcept(Concept.forID("outdoors23").withValue(true))) .and(SearchClause.matchImageURL(ClarifaiImage.of(METRO_NORTH_IMAGE_URL))) .build() ); }
@Test public void allDataShouldBeExposedAndNotNull() { SearchInputsRequest request = client.searchInputs(SearchClause.matchImageURL( ClarifaiImage.of(imageWithNoSearchHits))); ClarifaiResponse<SearchInputsResult> response = request.getPage(1).executeSync(); assertNotNull(response.get().id()); assertNotNull(response.getStatus()); assertNotNull(response.get().searchHits()); } }
@Test public void t17e_searchInputsWithModel_geo() { assertSuccess(client.addInputs().plus( ClarifaiInput.forImage(METRO_NORTH_IMAGE_URL) .withGeo(PointF.at(90F, 23F)) )); assertSuccess( client.searchInputs(matchConcept(Concept.forID("outdoors23").withValue(true))) .and(SearchClause.matchImageURL(ClarifaiImage.of(METRO_NORTH_IMAGE_URL))) .and(SearchClause.matchGeo(PointF.at(90F, 23F), Radius.of(5, Radius.Unit.MILE))) .build() ); }