Using TensorFlow in a Solr Query Parser
summary
A Python TensorFlow model does query tagging while BERT tokenization runs outside the model because TensorFlow for Java lacks tokenizer support; the SavedModel loads into a Solr query parser and expands queries directly in Solr. Cold initialization spikes to ~4s, static-cached runs show ~1.3s then ~0.5–0.6s, and the plugin is packaged as a Solr module. End-to-end expansion works but causes redundant per-shard execution, higher JVM memory use, and nontrivial compatibility and packaging pain.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 7:28Model
- 10:09Implementation
- 11:07Tokenization
- 13:24Classification
- 15:13Position
- 19:24Load Classes
- 19:42Parse
- 20:27Memory Usage
- 21:02Latency
- 21:19Static initialization
- 21:58Setup
- 23:15Security Manager
- 24:47Start Solr
- 25:33OpenSSL
- 26:13Add Solr Key
- 26:52Sign Library with Key
- 28:21Upload to Nodes
- 29:35Verification
- 29:58Solr config
- 30:40Bbus prefix
- 31:05Upload config
- 31:40Run queries
- 32:49Run query 2
- 33:21Model initialization
- 34:12Performance
- 35:24Next year
related talks
23mMachine Learning for Apache Solr, Elasticsearch & Vespa #bbuzz
47mNeural Search Comes to Apache Solr: Approximate Nearest Neighbor, BERT & more
21mPerformance Tuning Apache Solr for Dense Vectors
50mCreating a scalable (...) with Elixir, Python & Tensorflow
34mWorking with Tensorflow from the JVM #bbuzz
28mServing a Frontier Open Model with Ray & vLLM
41mSearching for the Right Words: Bringing NLP to Apache solr through ONNX and OpenNLP
22mScaling ONNX and TensorFlow model evaluation in search
