Best approach to generate embeddings for 10K+ documents in Spring Boot + OpenSearch (performance issue)

I am building a search system using Spring Boot and OpenSearch.

Current setup:

  • Using OpenSearch ingest pipeline with text_embedding processor
  • Each ZIP file contains 10K+ documents
  • Bulk indexing is used

Problem:

  • Indexing takes around 30 minutes per file, which is too slow

Requirements:

  • Data consistency is important
  • Need faster processing (preferably under 5 minutes)
  • Want a scalable production solution

Options I am considering:

  1. Continue with OpenSearch pipeline (optimize?)
  2. Use Java-based embedding (DJL)
  3. Use a Python FastAPI service for embeddings (batch processing)

Question:

  • What is the best approach for this scale?
  • Is using a Python embedding service a common production pattern?
  • How can I reduce embedding time significantly?

Any guidance or real-world experience would be helpful.

Best Regards,
M Naveen