Skip to content

Commit

Permalink
rebase latest code
Browse files Browse the repository at this point in the history
Signed-off-by: zane-neo <[email protected]>
  • Loading branch information
zane-neo committed May 27, 2024
1 parent 2a44a4d commit bb82974
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package org.opensearch.neuralsearch.processor;

import com.google.common.collect.ImmutableList;
import org.opensearch.index.mapper.IndexFieldMapper;
import org.opensearch.ingest.IngestDocument;
import org.opensearch.ingest.IngestDocumentWrapper;
import org.opensearch.test.OpenSearchTestCase;
Expand All @@ -21,6 +22,7 @@ protected List<IngestDocumentWrapper> createIngestDocumentWrappers(int count) {
for (int i = 0; i < count; ++i) {
Map<String, Object> sourceAndMetadata = new HashMap<>();
sourceAndMetadata.put("key1", "value1");
sourceAndMetadata.put(IndexFieldMapper.NAME, "my_index");
wrapperList.add(new IngestDocumentWrapper(i, new IngestDocument(sourceAndMetadata, new HashMap<>()), null));
}
return wrapperList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,7 @@ public void test_batchExecute_successful() {
public void test_batchExecute_exception() {
final int docCount = 5;
List<IngestDocumentWrapper> ingestDocumentWrappers = createIngestDocumentWrappers(docCount);
Map<String, Object> config = createPlainStringConfiguration();
TextEmbeddingProcessor processor = createInstanceWithNestedMapConfiguration(config);
TextEmbeddingProcessor processor = createInstanceWithLevel1MapConfig();
doAnswer(invocation -> {
ActionListener<List<List<Float>>> listener = invocation.getArgument(2);
listener.onFailure(new RuntimeException());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.opensearch.cluster.metadata.IndexMetadata.TRANSLOG_METADATA_KEY;
import static org.opensearch.index.mapper.SeqNoFieldMapper.PRIMARY_TERM_NAME;
import static org.opensearch.index.remote.RemoteStoreEnums.PathType.HASHED_PREFIX;
import static org.opensearch.neuralsearch.search.util.HybridSearchResultFormatUtil.isHybridQueryStartStopElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void test_with_different_configurations() throws URISyntaxException, IOEx
"field_map",
source,
fieldMap,
1,
"test_index",
clusterService,
environment,
Expand Down

0 comments on commit bb82974

Please sign in to comment.