Skip to content

Commit

Permalink
synonym_analyzer configuration setting
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Nov 2, 2024
1 parent 2b75b4d commit 458ce70
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add Setting to adjust the primary constraint weights ([#16471](https://github.com/opensearch-project/OpenSearch/pull/16471))
- Switch from `buildSrc/version.properties` to Gradle version catalog (`gradle/libs.versions.toml`) to enable dependabot to perform automated upgrades on common libs ([#16284](https://github.com/opensearch-project/OpenSearch/pull/16284))
- Add dynamic setting allowing size > 0 requests to be cached in the request cache ([#16483](https://github.com/opensearch-project/OpenSearch/pull/16483/files))
- Add new configuration setting `synonym_analyzer`, to the `synonym` and `synonym_graph` filters, enabling the specification of a custom analyzer for reading the synonym file ([#16488](https://github.com/opensearch-project/OpenSearch/pull/16488)).

### Dependencies
- Bump `com.azure:azure-storage-common` from 12.25.1 to 12.27.1 ([#16521](https://github.com/opensearch-project/OpenSearch/pull/16521))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,13 +754,13 @@ private Map<String, String> getOpenSearchEnvironment() {
if (systemProperties.isEmpty() == false) {
systemPropertiesString = " "
+ systemProperties.entrySet()
.stream()
.map(entry -> "-D" + entry.getKey() + "=" + entry.getValue())
// OPENSEARCH_PATH_CONF is also set as an environment variable and for a reference to ${OPENSEARCH_PATH_CONF}
// to work OPENSEARCH_JAVA_OPTS, we need to make sure that OPENSEARCH_PATH_CONF before OPENSEARCH_JAVA_OPTS. Instead,
// we replace the reference with the actual value in other environment variables
.map(p -> p.replace("${OPENSEARCH_PATH_CONF}", configFile.getParent().toString()))
.collect(Collectors.joining(" "));
.stream()
.map(entry -> "-D" + entry.getKey() + "=" + entry.getValue())
// OPENSEARCH_PATH_CONF is also set as an environment variable and for a reference to ${OPENSEARCH_PATH_CONF}
// to work OPENSEARCH_JAVA_OPTS, we need to make sure that OPENSEARCH_PATH_CONF before OPENSEARCH_JAVA_OPTS. Instead,
// we replace the reference with the actual value in other environment variables
.map(p -> p.replace("${OPENSEARCH_PATH_CONF}", configFile.getParent().toString()))
.collect(Collectors.joining(" "));
}
String jvmArgsString = "";
if (jvmArgs.isEmpty() == false) {
Expand All @@ -776,7 +776,7 @@ private Map<String, String> getOpenSearchEnvironment() {
defaultEnv.put(
"OPENSEARCH_JAVA_OPTS",
"-Xms" + heapSize + " -Xmx" + heapSize + " -ea -esa " + systemPropertiesString + " " + jvmArgsString + " " +
// Support passing in additional JVM arguments
// Support passing in additional JVM arguments
System.getProperty("tests.jvm.argline", "")
);
defaultEnv.put("OPENSEARCH_TMPDIR", tmpDir.toString());
Expand Down Expand Up @@ -1216,18 +1216,14 @@ private void createConfiguration() {
);

final List<Path> configFiles;
try (Stream<Path> stream = Files.walk(getDistroDir().resolve("config"))) {
try (Stream<Path> stream = Files.list(getDistroDir().resolve("config"))) {
configFiles = stream.collect(Collectors.toList());
}
logToProcessStdout("Copying additional config files from distro " + configFiles);
for (Path file : configFiles) {
Path relativePath = getDistroDir().resolve("config").relativize(file);
Path dest = configFile.getParent().resolve(relativePath);
if (Files.isDirectory(file)) {
Files.createDirectories(dest);
} else {
Files.createDirectories(dest.getParent());
Files.copy(file, dest, StandardCopyOption.REPLACE_EXISTING);
Path dest = configFile.getParent().resolve(file.getFileName());
if (Files.exists(dest) == false) {
Files.copy(file, dest);
}
}
} catch (IOException e) {
Expand Down Expand Up @@ -1301,13 +1297,13 @@ private Path getExtractedDistributionDir() {

private List<Provider<List<File>>> getInstalledFileSet(Action<? super PatternFilterable> filter) {
return Stream.concat(plugins.stream(), modules.stream()).map(p -> p.map(f -> {
if (f.exists()) {
final FileTree tree = archiveOperations.zipTree(f).matching(filter);
return tree.getFiles();
} else {
return new HashSet<File>();
}
}))
if (f.exists()) {
final FileTree tree = archiveOperations.zipTree(f).matching(filter);
return tree.getFiles();
} else {
return new HashSet<File>();
}
}))
.map(p -> p.map(f -> f.stream().sorted(Comparator.comparing(File::getName)).collect(Collectors.toList())))
.collect(Collectors.toList());
}
Expand Down Expand Up @@ -1396,8 +1392,8 @@ public boolean isProcessAlive() {

void waitForAllConditions() {
waitForConditions(waitConditions, System.currentTimeMillis(), NODE_UP_TIMEOUT_UNIT.toMillis(NODE_UP_TIMEOUT) +
// Installing plugins at config time and loading them when nods start requires additional time we need to
// account for
// Installing plugins at config time and loading them when nods start requires additional time we need to
// account for
ADDITIONAL_CONFIG_TIMEOUT_UNIT.toMillis(
(long) ADDITIONAL_CONFIG_TIMEOUT * (plugins.size() + keystoreFiles.size() + keystoreSettings.size() + credentials.size())
), TimeUnit.MILLISECONDS, this);
Expand Down

0 comments on commit 458ce70

Please sign in to comment.