Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace whoosh with tinydb #1402

Open
sbrunato opened this issue Nov 15, 2024 · 0 comments
Open

replace whoosh with tinydb #1402

sbrunato opened this issue Nov 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sbrunato
Copy link
Collaborator

Check how TinyDB could replace whoosh in eodag. Usage example:

import re
from eodag import EODataAccessGateway
from tinydb import TinyDB, Query
from tinydb.storages import MemoryStorage


dag = EODataAccessGateway()
pts = dag.list_product_types()

db = TinyDB(storage=MemoryStorage)
db.insert_multiple(pts)

ProductType = Query()

filtered_s2 = db.search(ProductType.ID.matches(r'S2_*'))
filtered_keywords = db.search(ProductType.keywords.matches(r'.*sentinel.*', flags=re.IGNORECASE))
@sbrunato sbrunato added the enhancement New feature or request label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant