Skip to content

Commit

Permalink
Removed defaultAcl configuration.
Browse files Browse the repository at this point in the history
Updated dependencies. Updated jar file assembly (file name). Support for per-search-application synonyms.
  • Loading branch information
cjohnson78 committed Feb 25, 2022
1 parent a6dbcf1 commit 9a72e2b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/run-synonyms-connector.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
java \
-cp ./lib/sadasystems-gcs-synonyms-connector-1.0-withlib.jar \
-cp ./lib/sadasystems-gcs-synonyms-connector-1.0-jar-with-dependencies.jar \
com.sadasystems.gcs.connector.synonyms.SynonymsConnector \
-Dconfig=./properties/synonyms-connector.properties \
-Djava.util.logging.config.file=./properties/logging.properties
Expand Down
9 changes: 9 additions & 0 deletions bin/schema/dictionary-entry-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"operatorName": "not_used"
}
}
},
{
"name": "_onlyApplicableForAttachedSearchApplications",
"isRepeatable": false,
"booleanPropertyOptions": {
"operatorOptions": {
"operatorName": "not_used"
}
}
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}-withlib</finalName>
<finalName>${project.artifactId}-${project.version}</finalName>
<outputDirectory>${project.basedir}/bin/lib</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
<appendAssemblyId>true</appendAssemblyId>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -133,12 +133,12 @@
<dependency>
<groupId>com.google.enterprise.cloudsearch</groupId>
<artifactId>google-cloudsearch-indexing-connector-sdk</artifactId>
<version>v1-0.0.3</version>
<version>v1-0.0.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand All @@ -148,7 +148,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.4</version>
<version>1.8</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ public class SynonymsRepository implements Repository {

private static final String SYNONYMS_FILE_PATH = "synonymsFile.path";
private static final String SYNONYMS_FILE_URL = "synonymsFile.url";
public static final String ONLY_APPLICABLE_FOR_ATTACHED_SEARCH_APPLICATIONS = "onlyApplicableForAttachedSearchApplications";

private String synonymsFilePath;
private String synonymsFileUrl;
private boolean onlyApplicableForAttachedSearchApplications;

public SynonymsRepository() {
}
Expand All @@ -54,6 +56,7 @@ public void init(RepositoryContext context) throws RepositoryException {

synonymsFilePath = Configuration.getString(SYNONYMS_FILE_PATH, "").get();
synonymsFileUrl = Configuration.getString(SYNONYMS_FILE_URL, "").get();
onlyApplicableForAttachedSearchApplications = Configuration.getBoolean(ONLY_APPLICABLE_FOR_ATTACHED_SEARCH_APPLICATIONS, false).get();
}


Expand Down Expand Up @@ -136,6 +139,7 @@ private ApiOperation buildDocument(CSVRecord record) {
Multimap<String, Object> structuredData = ArrayListMultimap.create();
structuredData.put("_term", term);
structuredData.putAll("_synonym", synonyms);
structuredData.put("_onlyApplicableForAttachedSearchApplications", onlyApplicableForAttachedSearchApplications);

String itemName = String.format("dictionary/%s", term);

Expand Down

0 comments on commit 9a72e2b

Please sign in to comment.