Using Apache OpenNLP with OpenSearch K-NN Vector Search
summary
Shows a working pipeline that exports a pre-trained sentence-transformers model to ONNX export, calls it from Java via ONNX Runtime inside Apache OpenNLP to produce 384‑dim vectors, indexes them into OpenSearch using the K-NN plugin and runs k‑NN queries. Demonstrates with three example sentences, indexes vectors of dimension 384, and retrieves results with scores 1, 0.75, 0.41 so the two presidential sentences cluster together while the unrelated sentence scores lower. Code and Docker compose are provided and the end‑to‑end demo runs successfully.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 0:27Apache OpenNLP overview
- 2:18Sentence transformers basics
- 3:22Exporting models to ONNX
- 5:55ONNX runtime integration
- 7:31Vector search with OpenSearch
- 19:39Conclusion and call to action
related talks
41mSearching for the Right Words: Bringing NLP to Apache solr through ONNX and OpenNLP
59mContextual search with vector search: exploring your options with open source tools
41mText to Context: How We Introduced Hybrid Search
31mIntelligent Japanese Search With OpenSearch
46mNatural Language & Search, Improve your Search w/ Vector capabilities
30mVector Search Made Simple: Getting Started with OpenSearch for AI Applications
26mAdvancing Multi-Modal Search Capabilities in Search Pipeline
28mHybrid Search with Apache Solr
