Running XGBoost Re-Rank Models in Elasticsearch Ingest Pipelines

How can I run re-ranking models within ingest pipelines to create a custom field containing the classification result?

For example:
I have an XGBoost model that uses the predict method. I’d like to apply it to each document during ingestion so that the prediction result is stored in a new field.

Is it possible to achieve this within an Elasticsearch ingest pipeline?