Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
328d079
Defaulting EIS on ELSER
mridula-s109 Sep 15, 2025
0b89373
Extended testing
mridula-s109 Sep 15, 2025
1cc9fd4
[CI] Auto commit changes from spotless
Sep 15, 2025
0829058
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Sep 17, 2025
7dcd31f
Edited to include the default
mridula-s109 Sep 17, 2025
f19972e
Cleaned up the mapper implementation
mridula-s109 Sep 17, 2025
3d58a50
COmpile issue
mridula-s109 Sep 17, 2025
394bf99
[CI] Auto commit changes from spotless
Sep 17, 2025
213aa24
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Sep 25, 2025
c92d2b3
Added tests
mridula-s109 Sep 30, 2025
1301a43
[CI] Auto commit changes from spotless
Sep 30, 2025
6ecdb6c
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 1, 2025
9f662ce
Refactored the variable names
mridula-s109 Oct 2, 2025
904a242
Cleanup done
mridula-s109 Oct 2, 2025
6355bed
Removed unnecessary files
mridula-s109 Oct 2, 2025
b4ed763
Unit tests and mock is working
mridula-s109 Oct 3, 2025
4f0d7c0
[CI] Auto commit changes from spotless
Oct 3, 2025
4680417
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 3, 2025
18f38b8
Fix test
mridula-s109 Oct 3, 2025
cc2e978
yaml addition failure
mridula-s109 Oct 3, 2025
33f4eaa
[CI] Auto commit changes from spotless
Oct 3, 2025
6ef7543
Resolved the import issue or duplication of variables in mock
mridula-s109 Oct 6, 2025
7733cfe
Resolved PR comments
mridula-s109 Oct 7, 2025
70a80a4
Restored error
mridula-s109 Oct 7, 2025
9564444
Update docs/changelog/134708.yaml
mridula-s109 Oct 7, 2025
0a678ed
Integration test
mridula-s109 Oct 8, 2025
d23256b
[CI] Auto commit changes from spotless
Oct 8, 2025
f0fc256
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 8, 2025
0edfb91
Resolved all PR comments
mridula-s109 Oct 14, 2025
f3c0da5
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 14, 2025
dd765ae
[CI] Auto commit changes from spotless
Oct 14, 2025
5d932ef
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 14, 2025
536d326
Cleaned up the redudant reference of TestInferencePlugin
mridula-s109 Oct 17, 2025
cd98727
Included both before and before test
mridula-s109 Oct 17, 2025
cf797e4
[CI] Auto commit changes from spotless
Oct 17, 2025
9e50bdc
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 17, 2025
d5c4841
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 27, 2025
f059474
Made changes to accomodate the old constant version string
mridula-s109 Oct 29, 2025
bc7a73a
Merge branch 'main' into default_elser_on_eis_semantic
mridula-s109 Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.junit.Before;
import org.junit.BeforeClass;

import java.io.IOException;
import java.util.Map;
Expand All @@ -20,6 +22,28 @@
*/
public class SemanticTextEISDefaultIT extends BaseMockEISAuthServerTest {

@Before
public void setUp() throws Exception {
super.setUp();
// Ensure the mock EIS server has an authorized response ready before each test
mockEISServer.enqueueAuthorizeAllModelsResponse();
}

/**
* This is done before the class because I've run into issues where another class that extends {@link BaseMockEISAuthServerTest}
* results in an authorization response not being queued up for the new Elasticsearch Node in time. When the node starts up, it
* retrieves authorization. If the request isn't queued up when that happens the tests will fail. From my testing locally it seems
* like the base class's static functionality to queue a response is only done once and not for each subclass.
*
* My understanding is that the @Before will be run after the node starts up and wouldn't be sufficient to handle
* this scenario. That is why this needs to be @BeforeClass.
*/
@BeforeClass
public static void init() {
// Ensure the mock EIS server has an authorized response ready
mockEISServer.enqueueAuthorizeAllModelsResponse();
}

public void testDefaultInferenceIdForSemanticText() throws IOException {
String indexName = "semantic-index";
String mapping = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
import org.elasticsearch.xcontent.json.JsonXContent;
import org.elasticsearch.xpack.core.XPackClientPlugin;
import org.elasticsearch.xpack.inference.InferencePlugin;
import org.elasticsearch.xpack.inference.mock.TestInferenceServicePlugin;
import org.elasticsearch.xpack.inference.model.TestModel;
import org.elasticsearch.xpack.inference.registry.ModelRegistry;
import org.elasticsearch.xpack.inference.services.elastic.ElasticInferenceService;
Expand Down Expand Up @@ -172,7 +171,7 @@ protected Collection<? extends Plugin> getPlugins() {
protected Supplier<ModelRegistry> getModelRegistry() {
return () -> globalModelRegistry;
}
}, new XPackClientPlugin(), new TestInferenceServicePlugin());
}, new XPackClientPlugin());
}

private void registerDefaultEisEndpoint() {
Expand Down