New SemanticFieldInferenceFieldsIT test#154009
Conversation
…/exclusion with semantic field
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Mikep86
left a comment
There was a problem hiding this comment.
I don't think this is how we should generalize this test case. It adds a lot of duplication that is confusing and hard to maintain. Instead, I think we can run cases for both field types through excludeInferenceFieldsFromSourceTestCase. We just need to parameterize that across a few dimensions:
- The inference endpoint(s) created
- The field(s) created (1:1 with the inference endpoints)
- The field values used during indexing
- We can use
SemanticTextFieldTests.randomSemanticInputto generate a random mix of values appropriate for the field type
- We can use
- The field(s) queried and asserted on
Most of the logic can live in AbstractInferenceFieldsIT, and the concrete implementations can be thin layers that define the abstract functions that implement these parameters.
Updated. Its in a better shape now. |
SemanticFieldInferenceFieldsITtest for inference field inclusion//exclusion withsemanticfield.SemanticTextnferenceFieldsITinto abstract base classAbstractInferenceFieldsITPartly addresses #146592