Skip to content

heinrichreimer/pyterrier-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PyPi CI Code coverage Python Issues Commit activity Downloads License

๐Ÿ” pyterrier_elasticsearch

Retrieve from Elasticsearch indices in PyTerrier. Powered by the elasticsearch package.

Installation

pip install pyterrier_elasticsearch

Usage

from elasticsearch import Elasticsearch
from pyterrier_elasticsearch import ElasticsearchRetrieve

client = Elasticsearch(...)
es = ElasticsearchRetrieve(
    client=client,
    index="test-index",
    fields=["text", "title"],
    columns={
        # source field -> destination column
        "text": "text",
        "title": "title",
    },
)

# Use PyTerrier functions like with BatchRetrieve.
es.search("python library")

Also, check out the sample notebook or open it in Google Colab .

Development

To build and develop this package you need to install the build package:

pip install build

Installation

Install package dependencies:

pip install -e .

Testing

Install test dependencies:

pip install -e .[test]

Verify your changes against the test suite to verify.

flake8 pyterrier_elasticsearch examples tests
pylint -E pyterrier_elasticsearch examples tests
pytest pyterrier_elasticsearch examples tests

Please also add tests for the axioms or integrations you've added.

Build wheel

A wheel for this package can be built by:

python -m build

License

This repository is released under the MIT license.

About

๐Ÿ” Use Elasticsearch indices in PyTerrier.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages