Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/feature/semantic-text' into re…
Browse files Browse the repository at this point in the history
…gister_semantic_text
  • Loading branch information
jimczi committed Mar 20, 2024
2 parents 1c18fbc + 823fb58 commit 38f82fd
Show file tree
Hide file tree
Showing 2 changed files with 379 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.support.ActionFilter;
import org.elasticsearch.action.support.ActionFilterChain;
import org.elasticsearch.action.support.MappedActionFilter;
import org.elasticsearch.action.support.RefCountingRunnable;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.cluster.metadata.FieldInferenceMetadata;
Expand Down Expand Up @@ -52,7 +53,7 @@
* the individual {@link BulkItemRequest}. The results are then consumed by the {@link InferenceMetadataFieldMapper}
* in the subsequent {@link TransportShardBulkAction} downstream.
*/
public class ShardBulkInferenceActionFilter implements ActionFilter {
public class ShardBulkInferenceActionFilter implements MappedActionFilter {
private static final Logger logger = LogManager.getLogger(ShardBulkInferenceActionFilter.class);

private final InferenceServiceRegistry inferenceServiceRegistry;
Expand All @@ -69,6 +70,11 @@ public int order() {
return Integer.MAX_VALUE;
}

@Override
public String actionName() {
return TransportShardBulkAction.ACTION_NAME;
}

@Override
public <Request extends ActionRequest, Response extends ActionResponse> void apply(
Task task,
Expand Down
Loading

0 comments on commit 38f82fd

Please sign in to comment.