Skip to content

Commit

Permalink
Update naming convention to Kendra Intelligent Ranking
Browse files Browse the repository at this point in the history
Signed-off-by: Mahita Mahesh <mahitam@amazon.com>
  • Loading branch information
Mahita Mahesh committed Oct 5, 2022
1 parent 64b152d commit 99eee30
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion semantic-reranker/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Semantic Reranker
# Kendra Intelligent Ranking
4 changes: 2 additions & 2 deletions semantic-reranker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ apply plugin: 'opensearch.pluginzip'

group = 'org.opensearch'

def pluginName = 'semantic-reranker'
def pluginName = 'kendra-intelligent-ranking'
def pluginDescription = 'Make Opensearch results more relevant.'
def projectPath = 'org.opensearch'
def pathToPlugin = 'search.relevance'
def pluginClassName = 'SemanticRerankerPlugin'
def pluginClassName = 'KendraIntelligentRankingPlugin'

publishing {
publications {
Expand Down
2 changes: 1 addition & 1 deletion semantic-reranker/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* in the user manual at https://docs.gradle.org/6.5.1/userguide/multi_project_builds.html
*/

rootProject.name = 'semantic-reranker'
rootProject.name = 'kendra-intelligent-ranking'
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.watcher.ResourceWatcherService;

public class SemanticRerankerPlugin extends Plugin implements ActionPlugin, SearchPlugin {
public class KendraIntelligentRankingPlugin extends Plugin implements ActionPlugin, SearchPlugin {

private OpenSearchClient openSearchClient;
private KendraHttpClient kendraClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
package org.opensearch.search.relevance.constants;

public class Constants {
private static final String PLUGIN_INDEX_SETTINGS_PREFIX = "index.semantic_ranker.";
public static final String ENABLED_SETTING_NAME = PLUGIN_INDEX_SETTINGS_PREFIX + "enabled";
public static final String PLUGIN_NAME = "kendra_intelligent_ranking";
public static final String PLUGIN_INDEX_SETTINGS_PREFIX = String.join(".", "index", PLUGIN_NAME);
public static final String ENABLED_FIELD_NAME = "enabled";
public static final String ENABLED_SETTING_NAME = String.join(".",PLUGIN_INDEX_SETTINGS_PREFIX, ENABLED_FIELD_NAME);

public static final String KENDRA_RANKING_SERVICE_NAME = "kendrareranking";
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@

@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE)
public class SemanticRerankerPluginIT extends OpenSearchIntegTestCase {
public class KendraIntelligentRankingPluginIT extends OpenSearchIntegTestCase {

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Collections.singletonList(SemanticRerankerPlugin.class);
return Collections.singletonList(KendraIntelligentRankingPlugin.class);
}

public void testPluginInstalled() throws IOException {
Response response = createRestClient().performRequest(new Request("GET", "/_cat/plugins"));
String body = EntityUtils.toString(response.getEntity());

logger.info("response body: {}", body);
assertThat(body, containsString("semantic-reranker"));
assertThat(body, containsString("kendra-intelligent-ranking"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

import org.opensearch.test.OpenSearchTestCase;

public class SemanticRerankerTests extends OpenSearchTestCase {
public class KendraIntelligentRankingTests extends OpenSearchTestCase {
// Add unit tests for your plugin
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase;


public class SemanticRerankerClientYamlTestSuiteIT extends OpenSearchClientYamlSuiteTestCase {
public class KendraIntelligentRankingClientYamlTestSuiteIT extends OpenSearchClientYamlSuiteTestCase {

public SemanticRerankerClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
public KendraIntelligentRankingClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
h: component

- match:
$body: /^semantic-reranker\n$/
$body: /^kendra-intelligent-ranking\n$/

0 comments on commit 99eee30

Please sign in to comment.