-
Notifications
You must be signed in to change notification settings - Fork 50
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
Explore options for fuzzy-match and search suggestions #605
Comments
In discussions with @Kezzsim, we are going ahead with TypeSense, as an optional add-on in the same way that Prometheus is an optional add-on. I think that this will involve:
{
'api_key': 'Hu52dwsas2AdxdE',
'nodes': [{
'host': 'localhost',
'port': '8108',
'protocol': 'http'
}],
'connection_timeout_seconds': 2
} tiled/tiled/catalog/adapter.py Lines 1135 to 1169 in c76d1b3
Tiled config like: trees:
- tree: catalog
args:
uri: postgresql+asyncpg://...
typesense:
api_key: $TYPESENSE_API_KEY
nodes:
- host: localhost
port: 8108
protocol: http
connection_timeout_seconds: 2 will just work, with no code changes to the config parser.
tiled/tiled/catalog/adapter.py Lines 111 to 119 in c76d1b3
The utility {
'api_key': '',
'nodes': [{
'host': 'localhost',
'port': '8108',
'protocol': 'http'
}],
'connection_timeout_seconds': 2
} |
All of above is up for a rethink, just meant as a quick sketch to highlight the relevant sections of the Tiled code that I can see will need to be touched. |
From discussion on 20 Feb:
typesense_ingestion:
- spec: BlueskyRun
fields:
- name: detectors # field name in TypeSense
path: "start.detectors" # path into Tiled JSON metadata
# Also type?
- spec: SomeOtherThing
... |
# config.yml
authentication:
# The default is false. Set to true to enable any HTTP client that can
# connect to _read_. An API key is still required to write.
allow_anonymous_access: false
single_user_api_key: "secret" # for dev
trees:
- path: /
tree: catalog
args:
uri: "sqlite+aiosqlite:///:memory:"
# or, uri: "sqlite+aiosqlite:////catalog.db"
# or, "postgresql+asyncpg://..."
writable_storage: "data/"
init_if_not_exists: true
typesense_client:
schema:
connection_info:
|
Phased approach:
We do not plan to add support for |
The built-in
MapAdapter
and externaldatabroker.mongo_normalized
adapter supports theFullText
query. We will add support forFullText
in the built-in SQL-backed Catalog Adapter in #456, #457 for SQLite and PostgreSQL respectively.Next, we should consider fuzzy match and search suggestions. This has often been done with the ELK stack, but that is a heavy stack to take on for the sake of just one of its features. What are our options?
@Kezzsim highlighted the project typesense, which is exactly targeted at serving this use case without taking on the weight of ELK.
Also, I believe there is some functionality in this space available in SQLite and PostgreSQL. While not at the level of ELK, it would be good to understand precisely how far we can get with the tech stack we already have, and what its limitations are.
The text was updated successfully, but these errors were encountered: