diff --git a/Dockerfile.philter b/Dockerfile.philter index 4cd4c37..f5f7b6f 100644 --- a/Dockerfile.philter +++ b/Dockerfile.philter @@ -5,12 +5,10 @@ ARG PHILTER_VERSION RUN apt-get update && apt-get -y install openjdk-17-jre RUN mkdir -p /opt/philter/ssl \ - && mkdir -p /opt/philter/indexes \ && mkdir -p /opt/philter/policies COPY ./README.md /opt/philter/ COPY ./LICENSE.txt /opt/philter/ -COPY ./distribution/indexes /opt/philter/indexes/ COPY ./distribution/policies /opt/philter/policies/ COPY ./distribution/philter.properties /opt/philter/ diff --git a/distribution/indexes/cities/_0.cfe b/distribution/indexes/cities/_0.cfe deleted file mode 100644 index 0eb5e7d..0000000 Binary files a/distribution/indexes/cities/_0.cfe and /dev/null differ diff --git a/distribution/indexes/cities/_0.cfs b/distribution/indexes/cities/_0.cfs deleted file mode 100644 index 6fadaf8..0000000 Binary files a/distribution/indexes/cities/_0.cfs and /dev/null differ diff --git a/distribution/indexes/cities/_0.si b/distribution/indexes/cities/_0.si deleted file mode 100644 index f0ea8b5..0000000 Binary files a/distribution/indexes/cities/_0.si and /dev/null differ diff --git a/distribution/indexes/cities/segments_2 b/distribution/indexes/cities/segments_2 deleted file mode 100644 index 6e95791..0000000 Binary files a/distribution/indexes/cities/segments_2 and /dev/null differ diff --git a/distribution/indexes/cities/write.lock b/distribution/indexes/cities/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/counties/_0.cfe b/distribution/indexes/counties/_0.cfe deleted file mode 100644 index e07ee2a..0000000 Binary files a/distribution/indexes/counties/_0.cfe and /dev/null differ diff --git a/distribution/indexes/counties/_0.cfs b/distribution/indexes/counties/_0.cfs deleted file mode 100644 index 7f0009b..0000000 Binary files a/distribution/indexes/counties/_0.cfs and /dev/null differ diff --git a/distribution/indexes/counties/_0.si b/distribution/indexes/counties/_0.si deleted file mode 100644 index 1e114e9..0000000 Binary files a/distribution/indexes/counties/_0.si and /dev/null differ diff --git a/distribution/indexes/counties/segments_1 b/distribution/indexes/counties/segments_1 deleted file mode 100644 index 1798fc6..0000000 Binary files a/distribution/indexes/counties/segments_1 and /dev/null differ diff --git a/distribution/indexes/counties/segments_2 b/distribution/indexes/counties/segments_2 deleted file mode 100644 index 2f38e18..0000000 Binary files a/distribution/indexes/counties/segments_2 and /dev/null differ diff --git a/distribution/indexes/counties/write.lock b/distribution/indexes/counties/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/hospital-abbreviations/_0.cfe b/distribution/indexes/hospital-abbreviations/_0.cfe deleted file mode 100644 index f90f084..0000000 Binary files a/distribution/indexes/hospital-abbreviations/_0.cfe and /dev/null differ diff --git a/distribution/indexes/hospital-abbreviations/_0.cfs b/distribution/indexes/hospital-abbreviations/_0.cfs deleted file mode 100644 index 23eb2f0..0000000 Binary files a/distribution/indexes/hospital-abbreviations/_0.cfs and /dev/null differ diff --git a/distribution/indexes/hospital-abbreviations/_0.si b/distribution/indexes/hospital-abbreviations/_0.si deleted file mode 100644 index 1f82ce1..0000000 Binary files a/distribution/indexes/hospital-abbreviations/_0.si and /dev/null differ diff --git a/distribution/indexes/hospital-abbreviations/segments_1 b/distribution/indexes/hospital-abbreviations/segments_1 deleted file mode 100644 index 640ca8e..0000000 Binary files a/distribution/indexes/hospital-abbreviations/segments_1 and /dev/null differ diff --git a/distribution/indexes/hospital-abbreviations/segments_2 b/distribution/indexes/hospital-abbreviations/segments_2 deleted file mode 100644 index 9eeaca8..0000000 Binary files a/distribution/indexes/hospital-abbreviations/segments_2 and /dev/null differ diff --git a/distribution/indexes/hospital-abbreviations/write.lock b/distribution/indexes/hospital-abbreviations/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/hospitals/_0.cfe b/distribution/indexes/hospitals/_0.cfe deleted file mode 100644 index 6e120c5..0000000 Binary files a/distribution/indexes/hospitals/_0.cfe and /dev/null differ diff --git a/distribution/indexes/hospitals/_0.cfs b/distribution/indexes/hospitals/_0.cfs deleted file mode 100644 index 2b8f7e9..0000000 Binary files a/distribution/indexes/hospitals/_0.cfs and /dev/null differ diff --git a/distribution/indexes/hospitals/_0.si b/distribution/indexes/hospitals/_0.si deleted file mode 100644 index 5e66e3c..0000000 Binary files a/distribution/indexes/hospitals/_0.si and /dev/null differ diff --git a/distribution/indexes/hospitals/segments_2 b/distribution/indexes/hospitals/segments_2 deleted file mode 100644 index d584ff1..0000000 Binary files a/distribution/indexes/hospitals/segments_2 and /dev/null differ diff --git a/distribution/indexes/hospitals/write.lock b/distribution/indexes/hospitals/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/names/_0.cfe b/distribution/indexes/names/_0.cfe deleted file mode 100644 index ff9f474..0000000 Binary files a/distribution/indexes/names/_0.cfe and /dev/null differ diff --git a/distribution/indexes/names/_0.cfs b/distribution/indexes/names/_0.cfs deleted file mode 100644 index ed4407c..0000000 Binary files a/distribution/indexes/names/_0.cfs and /dev/null differ diff --git a/distribution/indexes/names/_0.si b/distribution/indexes/names/_0.si deleted file mode 100644 index d72cc7d..0000000 Binary files a/distribution/indexes/names/_0.si and /dev/null differ diff --git a/distribution/indexes/names/segments_2 b/distribution/indexes/names/segments_2 deleted file mode 100644 index d24e0ef..0000000 Binary files a/distribution/indexes/names/segments_2 and /dev/null differ diff --git a/distribution/indexes/names/write.lock b/distribution/indexes/names/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/states/_0.cfe b/distribution/indexes/states/_0.cfe deleted file mode 100644 index fa7f236..0000000 Binary files a/distribution/indexes/states/_0.cfe and /dev/null differ diff --git a/distribution/indexes/states/_0.cfs b/distribution/indexes/states/_0.cfs deleted file mode 100644 index f792683..0000000 Binary files a/distribution/indexes/states/_0.cfs and /dev/null differ diff --git a/distribution/indexes/states/_0.si b/distribution/indexes/states/_0.si deleted file mode 100644 index dcd837a..0000000 Binary files a/distribution/indexes/states/_0.si and /dev/null differ diff --git a/distribution/indexes/states/segments_1 b/distribution/indexes/states/segments_1 deleted file mode 100644 index 8697a6d..0000000 Binary files a/distribution/indexes/states/segments_1 and /dev/null differ diff --git a/distribution/indexes/states/segments_2 b/distribution/indexes/states/segments_2 deleted file mode 100644 index 87cf6d2..0000000 Binary files a/distribution/indexes/states/segments_2 and /dev/null differ diff --git a/distribution/indexes/states/write.lock b/distribution/indexes/states/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/distribution/indexes/surnames/_2.fdt b/distribution/indexes/surnames/_2.fdt deleted file mode 100644 index d219060..0000000 Binary files a/distribution/indexes/surnames/_2.fdt and /dev/null differ diff --git a/distribution/indexes/surnames/_2.fdx b/distribution/indexes/surnames/_2.fdx deleted file mode 100644 index 40a2ae2..0000000 Binary files a/distribution/indexes/surnames/_2.fdx and /dev/null differ diff --git a/distribution/indexes/surnames/_2.fnm b/distribution/indexes/surnames/_2.fnm deleted file mode 100644 index dc3cc7b..0000000 Binary files a/distribution/indexes/surnames/_2.fnm and /dev/null differ diff --git a/distribution/indexes/surnames/_2.si b/distribution/indexes/surnames/_2.si deleted file mode 100644 index 30119dd..0000000 Binary files a/distribution/indexes/surnames/_2.si and /dev/null differ diff --git a/distribution/indexes/surnames/_2_Lucene50_0.doc b/distribution/indexes/surnames/_2_Lucene50_0.doc deleted file mode 100644 index 4824725..0000000 Binary files a/distribution/indexes/surnames/_2_Lucene50_0.doc and /dev/null differ diff --git a/distribution/indexes/surnames/_2_Lucene50_0.tim b/distribution/indexes/surnames/_2_Lucene50_0.tim deleted file mode 100644 index 5d35fc2..0000000 Binary files a/distribution/indexes/surnames/_2_Lucene50_0.tim and /dev/null differ diff --git a/distribution/indexes/surnames/_2_Lucene50_0.tip b/distribution/indexes/surnames/_2_Lucene50_0.tip deleted file mode 100644 index 56ccec6..0000000 Binary files a/distribution/indexes/surnames/_2_Lucene50_0.tip and /dev/null differ diff --git a/distribution/indexes/surnames/segments_2 b/distribution/indexes/surnames/segments_2 deleted file mode 100644 index b09c7a8..0000000 Binary files a/distribution/indexes/surnames/segments_2 and /dev/null differ diff --git a/distribution/indexes/surnames/write.lock b/distribution/indexes/surnames/write.lock deleted file mode 100644 index e69de29..0000000 diff --git a/philter-api/src/main/java/ai/philterd/philter/api/controllers/ExplainApiController.java b/philter-api/src/main/java/ai/philterd/philter/api/controllers/ExplainApiController.java index b98bd16..8e1050c 100644 --- a/philter-api/src/main/java/ai/philterd/philter/api/controllers/ExplainApiController.java +++ b/philter-api/src/main/java/ai/philterd/philter/api/controllers/ExplainApiController.java @@ -52,7 +52,7 @@ public ExplainApiController(FilterService filterService, Gson gson) { final FilterResponse response = filterService.filter(policies, context, documentId, body, MimeType.TEXT_PLAIN); return ResponseEntity.status(HttpStatus.OK) - .header("x-document-id", response.documentId()) + .header("x-document-id", response.getDocumentId()) .contentType(MediaType.APPLICATION_JSON) .body(gson.toJson(response)); diff --git a/philter-api/src/main/java/ai/philterd/philter/api/controllers/FilterApiController.java b/philter-api/src/main/java/ai/philterd/philter/api/controllers/FilterApiController.java index d5345b5..d067771 100644 --- a/philter-api/src/main/java/ai/philterd/philter/api/controllers/FilterApiController.java +++ b/philter-api/src/main/java/ai/philterd/philter/api/controllers/FilterApiController.java @@ -95,8 +95,8 @@ public FilterApiController(FilterService filterService) { final FilterResponse response = filterService.filter(policies, context, documentId, body, MimeType.TEXT_PLAIN); return ResponseEntity.status(HttpStatus.OK) - .header("x-document-id", response.documentId()) - .body(response.filteredText()); + .header("x-document-id", response.getDocumentId()) + .body(response.getFilteredText()); } diff --git a/pom.xml b/pom.xml index 0dffdcb..f2997c5 100644 --- a/pom.xml +++ b/pom.xml @@ -93,10 +93,12 @@ 4.13.2 1.13.3 1.10.19 - 2.9.1 + 2.10.0-SNAPSHOT 1.4.0 3.3.1 6.1.10 + 17 + 17