Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
5.24.0
UniCOIL with ElasticSearch
- Setup ElasticSearch with Docker by following document here.
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.2.3
docker network create elastic
docker run --name es01 --net elastic -d -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=false" \
-it docker.elastic.co/elasticsearch/elasticsearch:8.2.2
- (Optional) Setup Kibana by following document here.
docker pull docker.elastic.co/kibana/kibana:8.2.2
docker run -d --name kib-01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.2.2
- Create ES index
python create_es.py
This will create index based on two search field:
document
: contains raw text for BM25 searchvector
: contains pseudo text from uniCOIL for impact search
- Create document entry for BM25 index
python index_bm25.py
- Add uniCOIL encoded document for impact search
python index_unicoil_update.py
- BM25 search
python search_bm25.py
- uniCOIL search
python search_unicoil.py
- Hybrid Search
python search_unicoil.py