-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Semantic Text] Integration Test #125141
[Semantic Text] Integration Test #125141
Conversation
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Outdated
Show resolved
Hide resolved
3cb2949
to
8332e8d
Compare
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/search-relevance (Team:Search - Relevance) |
@elasticmachine update branch |
@elasticmachine update branch |
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Show resolved
Hide resolved
import static org.hamcrest.Matchers.equalTo; | ||
|
||
public class SemanticTextIndexVersionIT extends ESIntegTestCase { | ||
private static final IndexVersion SEMANTIC_TEXT_INTRODUCED_VERSION = IndexVersion.fromId(8512000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This index version starts from 8.15
. If we use the SEMANTIC_TEXT_FIELD_TYPE
, the index version starts from 8.14.4/5
and fails to create the semantic_text field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried starting from SEMANTIC_TEXT_FIELD_TYPE
and the test passes. Perhaps the test failure was related to other problems that you've now fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start to this, I left some comments on how to move it forward
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Show resolved
Hide resolved
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Outdated
Show resolved
Hide resolved
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Outdated
Show resolved
Hide resolved
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Outdated
Show resolved
Hide resolved
...usterTest/java/org/elasticsearch/xpack/inference/integration/SemanticTextIndexVersionIT.java
Outdated
Show resolved
Hide resolved
...gin/inference/src/test/java/org/elasticsearch/xpack/inference/LocalStateInferencePlugin.java
Outdated
Show resolved
Hide resolved
...gin/inference/src/test/java/org/elasticsearch/xpack/inference/LocalStateInferencePlugin.java
Outdated
Show resolved
Hide resolved
...gin/inference/src/test/java/org/elasticsearch/xpack/inference/LocalStateInferencePlugin.java
Outdated
Show resolved
Hide resolved
@Mikep86 @Samiul-TheSoccerFan the query is registered in |
XPackClientPlugin only registers it as a query, not a named writeable. It shouldn't be necessary to register it as a named writeable because rewriting to We debugged the issue a bit and the serialization happens when generating the search response in the test, after the query execution is complete. Adding to the mystery, this serialization does not happen when executing a |
@Samiul-TheSoccerFan @kderusso Figured out what's going on with Queries exposed via IMO the way to do this is to add the following to @Override
public List<QuerySpec<?>> getQueries() {
List<QuerySpec<?>> querySpecs = new ArrayList<>(super.getQueries()); // The xpack plugin also registers queries, include those
filterPlugins(SearchPlugin.class).stream().flatMap(p -> p.getQueries().stream()).forEach(querySpecs::add);
return querySpecs;
} This should handle the case for every plugin that extends |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking much better, two small things to adjust and I think we're good :)
import static org.hamcrest.Matchers.equalTo; | ||
|
||
public class SemanticTextIndexVersionIT extends ESIntegTestCase { | ||
private static final IndexVersion SEMANTIC_TEXT_INTRODUCED_VERSION = IndexVersion.fromId(8512000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried starting from SEMANTIC_TEXT_FIELD_TYPE
and the test passes. Perhaps the test failure was related to other problems that you've now fixed?
...gin/inference/src/test/java/org/elasticsearch/xpack/inference/LocalStateInferencePlugin.java
Outdated
Show resolved
Hide resolved
@elasticmachine update branch |
@elasticmachine update branch |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Very nice work, and thanks for all of the iterations! 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was waiting for green CI, but it looks like that's hosed for unrelated reasons. Good work!
@elasticmachine update branch |
@elasticmachine update branch |
💚 Backport successful
|
* Initial draft test with index version setup * Adding test in phases * [CI] Auto commit changes from spotless * Adding test for search functionality * Adding test for highlighting * Adding randomization during selection process * Fix code styles by running spotlessApply * Fix code styles by running spotlessApply * Fixing forbiddenAPIcall issue * Decoupled namedWritables to use separate fake plugin and simplified other override methods * Updating settings string to variable and removed unused code * Fix SemanticQueryBuilder dependencies * fix setting maximum number of tests to run * utilizing semantci_text index version param and removed unwanted override --------- Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* [Semantic Text] Integration Test (#125141) * Initial draft test with index version setup * Adding test in phases * [CI] Auto commit changes from spotless * Adding test for search functionality * Adding test for highlighting * Adding randomization during selection process * Fix code styles by running spotlessApply * Fix code styles by running spotlessApply * Fixing forbiddenAPIcall issue * Decoupled namedWritables to use separate fake plugin and simplified other override methods * Updating settings string to variable and removed unused code * Fix SemanticQueryBuilder dependencies * fix setting maximum number of tests to run * utilizing semantci_text index version param and removed unwanted override --------- Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]> * Removing time value field for 8.* --------- Co-authored-by: elasticsearchmachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
An integration test to: