Skip to content

Conversation

@maniax89
Copy link
Contributor

Summary

This introduces Discovery service to the java-sdk

Other Information

good luck reviewing it!

Thanks for contributing to the Watson Developer Cloud!

@germanattanasio germanattanasio self-assigned this Dec 13, 2016
Copy link
Contributor

@germanattanasio germanattanasio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass

<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>discovery</artifactId>
<version>3.5.2</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.5.3

The [Discovery][discovery] wraps the environment, collection, configuration, document, and query operations of the Discovery service.

```java
Discovery service = new Discovery("2016-12-01");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's 2016-12-15. In any casem we need it to be the same as in the documentation

import java.util.Date;

/**
* @author apturgeo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some lines describing what the class does?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove @author

private String name;
//TODO make this an enum
@SerializedName(STATUS)
private String status;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to make it an enum ?

import com.ibm.watson.developer_cloud.discovery.v1.model.collection.field.Field;

/**
* @author apturgeo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no author

/**
* Copyright 2016 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

120 max line width

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is 119

@@ -0,0 +1,64 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Aggregation should be enough as a class name. No need to have Query at the beginning.

@germanattanasio
Copy link
Contributor

@maniax89 update your github profile!!!

@maniax89
Copy link
Contributor Author

maniax89 commented Dec 14, 2016

@germanattanasio

Here is a rough list of things I have not done yet (but probably will not have time to do):

  • Configuration
    • EnrichmentOptions
      • many of the enrichment POJOs need revisited as they have not been updated in a while
  • Preview request (test your configuration on a document)
  • Query
    • Aggregation types
      • Timeslice
      • Top Hits
  • Document
    • Create/Update don't support metadata yet
    • Create/Update don't support custom configuration (only configuration_id of existing configuration)

Copy link
Contributor

@kognate kognate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kognate kognate dismissed germanattanasio’s stale review December 14, 2016 21:58

He made a bunch of changes.

@kognate kognate merged commit 53964b3 into watson-developer-cloud:master Dec 14, 2016
@maniax89 maniax89 deleted the discovery branch January 4, 2017 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants