Permalink
Browse files

fix some deprecation warnings

  • Loading branch information...
1 parent 7c7f1cd commit 453c434267c80ea3421c423711b1482bfbf75d2e Robert Newson committed Apr 12, 2012
@@ -285,15 +285,15 @@ public void admin(final HttpServletRequest req,
if ("_expunge".equals(command)) {
logger.info("Expunging deletes from " + state);
- state.writer.expungeDeletes(false);
+ state.writer.forceMergeDeletes(false);
resp.setStatus(202);
ServletUtils.sendJsonSuccess(req, resp);
return;
}
if ("_optimize".equals(command)) {
logger.info("Optimizing " + state);
- state.writer.optimize(false);
+ state.writer.forceMerge(1, false);
resp.setStatus(202);
ServletUtils.sendJsonSuccess(req, resp);
return;
@@ -40,19 +40,19 @@ public void setup() {
@Test
public void testPDF() throws IOException {
parse("paxos-simple.pdf", "application/pdf", "foo");
- assertThat(doc.getField("foo"), not(nullValue()));
+ assertThat(doc.getFieldable("foo"), not(nullValue()));
}
@Test
public void testXML() throws IOException {
parse("example.xml", "text/xml", "bar");
- assertThat(doc.getField("bar"), not(nullValue()));
+ assertThat(doc.getFieldable("bar"), not(nullValue()));
}
@Test
public void testWord() throws IOException {
parse("example.doc", "application/msword", "bar");
- assertThat(doc.getField("bar"), not(nullValue()));
+ assertThat(doc.getFieldable("bar"), not(nullValue()));
assertThat(doc.get("bar"), containsString("The express mission of the organization"));
}

0 comments on commit 453c434

Please sign in to comment.