diff --git a/.gitignore b/.gitignore
index 6731271b7d8..25751278147 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,8 @@ service-account.json
# intellij
.idea/
*.iml
+
+# Eclipse files
+.project
+.classpath
+.settings
diff --git a/appengine/search/.gitignore b/appengine/search/.gitignore
deleted file mode 100644
index 471339729ae..00000000000
--- a/appengine/search/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-# Eclipse files
-.project
-.classpath
-.settings
-
-# Target folders
-target/
diff --git a/appengine/search/google-checks.xml b/appengine/search/google-checks.xml
deleted file mode 100644
index 730c9148710..00000000000
--- a/appengine/search/google-checks.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/appengine/search/pom.xml b/appengine/search/pom.xml
index 7d701bf5f67..9af359bb5f9 100644
--- a/appengine/search/pom.xml
+++ b/appengine/search/pom.xml
@@ -81,22 +81,6 @@ Copyright 2015 Google Inc. All Rights Reserved.
${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
- 2.17
-
- google-checks.xml
- true
- true
- true
- true
- suppressions.xml
-
-
- check
-
-
org.apache.maven.plugins
3.3
diff --git a/appengine/search/src/main/java/com/example/appengine/search/DeleteServlet.java b/appengine/search/src/main/java/com/example/appengine/search/DeleteServlet.java
index 6b25a22638e..89ba596317a 100644
--- a/appengine/search/src/main/java/com/example/appengine/search/DeleteServlet.java
+++ b/appengine/search/src/main/java/com/example/appengine/search/DeleteServlet.java
@@ -23,13 +23,13 @@
import com.google.appengine.api.search.GetResponse;
// [END delete_import]
-//CHECKSTYLE:OFF
+// CHECKSTYLE:OFF
import com.google.appengine.api.search.Field;
import com.google.appengine.api.search.Index;
import com.google.appengine.api.search.IndexSpec;
import com.google.appengine.api.search.SearchServiceFactory;
// @formatter:on
-//CHECKSTYLE:ON
+// CHECKSTYLE:ON
import java.io.IOException;
import java.io.PrintWriter;
diff --git a/appengine/search/src/main/java/com/example/appengine/search/IndexServlet.java b/appengine/search/src/main/java/com/example/appengine/search/IndexServlet.java
index 85e53b5bfb4..c1394571c5f 100644
--- a/appengine/search/src/main/java/com/example/appengine/search/IndexServlet.java
+++ b/appengine/search/src/main/java/com/example/appengine/search/IndexServlet.java
@@ -23,13 +23,13 @@
import com.google.appengine.api.search.IndexSpec;
import com.google.appengine.api.search.SearchServiceFactory;
-//CHECKSTYLE:OFF
+// CHECKSTYLE:OFF
// [START get_document_import]
import com.google.appengine.api.search.GetRequest;
import com.google.appengine.api.search.GetResponse;
// [END get_document_import]
// @formatter:on
-//CHECKSTYLE:ON
+// CHECKSTYLE:ON
import java.io.IOException;
import java.io.PrintWriter;
diff --git a/appengine/search/src/main/java/com/example/appengine/search/SchemaServlet.java b/appengine/search/src/main/java/com/example/appengine/search/SchemaServlet.java
new file mode 100644
index 00000000000..6120dfc2661
--- /dev/null
+++ b/appengine/search/src/main/java/com/example/appengine/search/SchemaServlet.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.appengine.search;
+
+import com.google.appengine.api.search.Document;
+import com.google.appengine.api.search.Field;
+import com.google.appengine.api.search.SearchServiceFactory;
+
+// @formatter:off
+// CHECKSTYLE:OFF
+// [START schema_import]
+import com.google.appengine.api.search.Field.FieldType;
+import com.google.appengine.api.search.Index;
+import com.google.appengine.api.search.GetIndexesRequest;
+import com.google.appengine.api.search.GetResponse;
+import com.google.appengine.api.search.Schema;
+// [END schema_import]
+// @formatter:on
+// CHECKSTYLE:ON
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+@SuppressWarnings("serial")
+public class SchemaServlet extends HttpServlet {
+
+ private static final String SEARCH_INDEX = "schemaIndex";
+
+ @Override
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws IOException {
+ PrintWriter out = resp.getWriter();
+ Document doc = Document.newBuilder()
+ .setId("theOnlyCar")
+ .addField(Field.newBuilder().setName("maker").setText("Toyota"))
+ .addField(Field.newBuilder().setName("price").setNumber(300000))
+ .addField(Field.newBuilder().setName("color").setText("lightblue"))
+ .addField(Field.newBuilder().setName("model").setText("Prius"))
+ .build();
+ try {
+ Utils.indexADocument(SEARCH_INDEX, doc);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ // [START list_schema]
+ GetResponse response = SearchServiceFactory.getSearchService().getIndexes(
+ GetIndexesRequest.newBuilder().setSchemaFetched(true).build());
+
+ // List out elements of each Schema
+ for (Index index : response) {
+ Schema schema = index.getSchema();
+ for (String fieldName : schema.getFieldNames()) {
+ List typesForField = schema.getFieldTypes(fieldName);
+ // Just printing out the field names and types
+ for (FieldType type : typesForField) {
+ out.println(index.getName() + ":" + fieldName + ":" + type.name());
+ }
+ }
+ }
+ // [START list_schema]
+ }
+}
diff --git a/appengine/search/src/main/java/com/example/appengine/search/SearchOptionServlet.java b/appengine/search/src/main/java/com/example/appengine/search/SearchOptionServlet.java
new file mode 100644
index 00000000000..f3191a49847
--- /dev/null
+++ b/appengine/search/src/main/java/com/example/appengine/search/SearchOptionServlet.java
@@ -0,0 +1,126 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.appengine.search;
+
+import com.google.appengine.api.search.Document;
+import com.google.appengine.api.search.Index;
+
+// CHECKSTYLE:OFF
+// @formatter:off
+// [START search_option_import]
+import com.google.appengine.api.search.Field;
+import com.google.appengine.api.search.IndexSpec;
+import com.google.appengine.api.search.SearchServiceFactory;
+import com.google.appengine.api.search.Query;
+import com.google.appengine.api.search.QueryOptions;
+import com.google.appengine.api.search.Results;
+import com.google.appengine.api.search.SearchException;
+import com.google.appengine.api.search.SortExpression;
+import com.google.appengine.api.search.SortOptions;
+import com.google.appengine.api.search.ScoredDocument;
+// [END search_option_import]
+// @formatter:on
+// CHECKSTYLE:ON
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.logging.Logger;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * Code snippet for searching with query options.
+ */
+@SuppressWarnings("serial")
+public class SearchOptionServlet extends HttpServlet {
+ private static final Logger LOG = Logger.getLogger(SearchOptionServlet.class.getSimpleName());
+
+ private static final String SEARCH_INDEX = "searchOptionIndex";
+
+ private Index getIndex() {
+ IndexSpec indexSpec = IndexSpec.newBuilder().setName(SEARCH_INDEX).build();
+ Index index = SearchServiceFactory.getSearchService().getIndex(indexSpec);
+ return index;
+ }
+
+ private Results doSearch() {
+ String indexName = SEARCH_INDEX;
+ // [START search_with_options]
+ try {
+ // Build the SortOptions with 2 sort keys
+ SortOptions sortOptions = SortOptions.newBuilder()
+ .addSortExpression(SortExpression.newBuilder()
+ .setExpression("price")
+ .setDirection(SortExpression.SortDirection.DESCENDING)
+ .setDefaultValueNumeric(0))
+ .addSortExpression(SortExpression.newBuilder()
+ .setExpression("brand")
+ .setDirection(SortExpression.SortDirection.DESCENDING)
+ .setDefaultValue(""))
+ .setLimit(1000)
+ .build();
+
+ // Build the QueryOptions
+ QueryOptions options = QueryOptions.newBuilder()
+ .setLimit(25)
+ .setFieldsToReturn("model", "price", "description")
+ .setSortOptions(sortOptions)
+ .build();
+
+ // A query string
+ String queryString = "product: coffee roaster AND price < 500";
+
+ // Build the Query and run the search
+ Query query = Query.newBuilder().setOptions(options).build(queryString);
+ IndexSpec indexSpec = IndexSpec.newBuilder().setName(indexName).build();
+ Index index = SearchServiceFactory.getSearchService().getIndex(indexSpec);
+ Results result = index.search(query);
+ return result;
+ } catch (SearchException e) {
+ // handle exception...
+ }
+ return null;
+ // [END search_with_options]
+ }
+
+ @Override
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws IOException {
+ // Put one document to avoid an error
+ Document document = Document.newBuilder()
+ .setId("theOnlyCoffeeRoaster")
+ .addField(Field.newBuilder().setName("price").setNumber(200))
+ .addField(Field.newBuilder().setName("model").setText("TZ4000"))
+ .addField(Field.newBuilder().setName("brand").setText("MyBrand"))
+ .addField(Field.newBuilder().setName("product").setText("coffee roaster"))
+ .addField(Field.newBuilder()
+ .setName("description").setText("A coffee bean roaster at home"))
+ .build();
+ try {
+ Utils.indexADocument(SEARCH_INDEX, document);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ PrintWriter out = resp.getWriter();
+ Results result = doSearch();
+ for (ScoredDocument doc : result.getResults()) {
+ out.println(doc.toString());
+ }
+ }
+}
diff --git a/appengine/search/src/main/java/com/example/appengine/search/SearchServlet.java b/appengine/search/src/main/java/com/example/appengine/search/SearchServlet.java
index 8804ac48cec..efb32d6a242 100644
--- a/appengine/search/src/main/java/com/example/appengine/search/SearchServlet.java
+++ b/appengine/search/src/main/java/com/example/appengine/search/SearchServlet.java
@@ -26,12 +26,12 @@
import com.google.appengine.api.search.StatusCode;
// [END search_document_import]
-//CHECKSTYLE:OFF
+// CHECKSTYLE:OFF
import com.google.appengine.api.search.Index;
import com.google.appengine.api.search.IndexSpec;
import com.google.appengine.api.search.SearchServiceFactory;
// @formatter:on
-//CHECKSTYLE:ON
+// CHECKSTYLE:ON
import java.io.IOException;
import java.io.PrintWriter;
@@ -73,7 +73,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp)
int delay = 2;
while (true) {
try {
- String queryString = "product: piano AND price < 5000";
+ String queryString = "product = piano AND price < 5000";
Results results = getIndex().search(queryString);
// Iterate over the documents in the results
@@ -99,7 +99,19 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp)
}
break;
}
- // [START search_document]
+ // [END search_document]
+ // We don't test the search result below, but we're fine if it runs without errors.
out.println("Search performed");
+ Index index = getIndex();
+ // [START simple_search_1]
+ index.search("rose water");
+ // [END simple_search_1]
+ // [START simple_search_2]
+ index.search("1776-07-04");
+ // [END simple_search_2]
+ // [START simple_search_3]
+ // search for documents with pianos that cost less than $5000
+ index.search("product = piano AND price < 5000");
+ // [END simple_search_3]
}
}
diff --git a/appengine/search/src/main/webapp/WEB-INF/web.xml b/appengine/search/src/main/webapp/WEB-INF/web.xml
index a3f744efa07..d3e1e6f8ec3 100644
--- a/appengine/search/src/main/webapp/WEB-INF/web.xml
+++ b/appengine/search/src/main/webapp/WEB-INF/web.xml
@@ -27,6 +27,14 @@
search
/search
+
+ search_option
+ com.example.appengine.search.SearchOptionServlet
+
+
+ search_option
+ /search_option
+
delete
com.example.appengine.search.DeleteServlet
@@ -35,4 +43,12 @@
delete
/delete
+
+ schema
+ com.example.appengine.search.SchemaServlet
+
+
+ schema
+ /schema
+
diff --git a/appengine/search/src/test/java/com/example/appengine/search/DeleteServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/DeleteServletTest.java
index 2ec6dde14c3..d520d56c1d3 100644
--- a/appengine/search/src/test/java/com/example/appengine/search/DeleteServletTest.java
+++ b/appengine/search/src/test/java/com/example/appengine/search/DeleteServletTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.example.appengine.search;
import static com.google.common.truth.Truth.assertThat;
diff --git a/appengine/search/src/test/java/com/example/appengine/search/DocumentServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/DocumentServletTest.java
index 789be7ea443..d5b32f2c62c 100644
--- a/appengine/search/src/test/java/com/example/appengine/search/DocumentServletTest.java
+++ b/appengine/search/src/test/java/com/example/appengine/search/DocumentServletTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.example.appengine.search;
import static com.google.common.truth.Truth.assertThat;
diff --git a/appengine/search/src/test/java/com/example/appengine/search/IndexServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/IndexServletTest.java
index 041ac35e33a..5a084b85d9a 100644
--- a/appengine/search/src/test/java/com/example/appengine/search/IndexServletTest.java
+++ b/appengine/search/src/test/java/com/example/appengine/search/IndexServletTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.example.appengine.search;
import static com.google.common.truth.Truth.assertThat;
diff --git a/appengine/search/src/test/java/com/example/appengine/search/SchemaServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/SchemaServletTest.java
new file mode 100644
index 00000000000..2a9fb122642
--- /dev/null
+++ b/appengine/search/src/test/java/com/example/appengine/search/SchemaServletTest.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.appengine.search;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.when;
+
+import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class SchemaServletTest {
+ private final LocalServiceTestHelper helper = new LocalServiceTestHelper();
+
+ @Mock private HttpServletRequest mockRequest;
+ @Mock private HttpServletResponse mockResponse;
+ private StringWriter responseWriter;
+ private SchemaServlet servletUnderTest;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ helper.setUp();
+
+ // Set up a fake HTTP response.
+ responseWriter = new StringWriter();
+ when(mockResponse.getWriter()).thenReturn(new PrintWriter(responseWriter));
+
+ servletUnderTest = new SchemaServlet();
+ }
+
+ @After
+ public void tearDown() {
+ helper.tearDown();
+ }
+
+ @Test
+ public void doGet_successfulyInvoked() throws Exception {
+ servletUnderTest.doGet(mockRequest, mockResponse);
+ String content = responseWriter.toString();
+ assertThat(content)
+ .named("SchemaServlet response")
+ .contains("schemaIndex:maker:TEXT");
+ assertThat(content)
+ .named("SchemaServlet response")
+ .contains("schemaIndex:price:NUMBER");
+ assertThat(content)
+ .named("SchemaServlet response")
+ .contains("schemaIndex:color:TEXT");
+ assertThat(content)
+ .named("SchemaServlet response")
+ .contains("schemaIndex:model:TEXT");
+ }
+}
\ No newline at end of file
diff --git a/appengine/search/src/test/java/com/example/appengine/search/SearchOptionServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/SearchOptionServletTest.java
new file mode 100644
index 00000000000..2b759eaf1bf
--- /dev/null
+++ b/appengine/search/src/test/java/com/example/appengine/search/SearchOptionServletTest.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.appengine.search;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.when;
+
+import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class SearchOptionServletTest {
+ private final LocalServiceTestHelper helper = new LocalServiceTestHelper();
+
+ @Mock private HttpServletRequest mockRequest;
+ @Mock private HttpServletResponse mockResponse;
+ private StringWriter responseWriter;
+ private SearchOptionServlet servletUnderTest;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ helper.setUp();
+
+ // Set up a fake HTTP response.
+ responseWriter = new StringWriter();
+ when(mockResponse.getWriter()).thenReturn(new PrintWriter(responseWriter));
+
+ servletUnderTest = new SearchOptionServlet();
+ }
+
+ @After
+ public void tearDown() {
+ helper.tearDown();
+ }
+
+ @Test
+ public void doGet_successfulyInvoked() throws Exception {
+ servletUnderTest.doGet(mockRequest, mockResponse);
+ assertThat(responseWriter.toString())
+ .named("SearchOptionServlet response")
+ .contains("documentId=theOnlyCoffeeRoaster");
+ }
+}
diff --git a/appengine/search/src/test/java/com/example/appengine/search/SearchServletTest.java b/appengine/search/src/test/java/com/example/appengine/search/SearchServletTest.java
index 719855cb472..f2fa060e48a 100644
--- a/appengine/search/src/test/java/com/example/appengine/search/SearchServletTest.java
+++ b/appengine/search/src/test/java/com/example/appengine/search/SearchServletTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.example.appengine.search;
import static com.google.common.truth.Truth.assertThat;
diff --git a/appengine/search/src/test/java/com/example/appengine/search/UtilsTest.java b/appengine/search/src/test/java/com/example/appengine/search/UtilsTest.java
index 491cd377b23..ff8ee847c71 100644
--- a/appengine/search/src/test/java/com/example/appengine/search/UtilsTest.java
+++ b/appengine/search/src/test/java/com/example/appengine/search/UtilsTest.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2016 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.example.appengine.search;
import static com.google.common.truth.Truth.assertThat;
diff --git a/appengine/search/suppressions.xml b/appengine/search/suppressions.xml
deleted file mode 100644
index 22a348c205e..00000000000
--- a/appengine/search/suppressions.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/java-repo-tools/google-checks.xml b/java-repo-tools/google-checks.xml
index 5f1d75b1e7e..730c9148710 100644
--- a/java-repo-tools/google-checks.xml
+++ b/java-repo-tools/google-checks.xml
@@ -213,8 +213,11 @@
+
+
+