diff options
author | John Nduli | 2024-06-14 21:20:10 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-07-03 14:24:01 +0300 |
commit | 6cbe69014beeb5f7ce38e63032c61225e269bfd4 (patch) | |
tree | 8b7538a68ad6151b8464cda947cb86af237d8b44 /scripts/index-genenetwork | |
parent | 189d90ef44317784c1d884943113592e10b27493 (diff) | |
download | genenetwork3-6cbe69014beeb5f7ce38e63032c61225e269bfd4.tar.gz |
feat: add global wikicache
Diffstat (limited to 'scripts/index-genenetwork')
-rwxr-xr-x | scripts/index-genenetwork | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork index 63d730a..a554b47 100755 --- a/scripts/index-genenetwork +++ b/scripts/index-genenetwork @@ -364,6 +364,12 @@ def index_genes(xapian_build_directory: pathlib.Path, chunk_index: int, namespac trait["species"], trait["symbol"], Just(share.rif_cache) ) + Maybe.apply( + index_wiki_comments + ).to_arguments( + trait["species"], trait["symbol"] + ) + doc.set_data(json.dumps(trait.data)) (Maybe.apply(curry(2, lambda name, dataset: f"{name}:{dataset}")) .to_arguments(trait["name"], trait["dataset"]) @@ -447,6 +453,7 @@ def index_query(index_function: Callable[[pathlib.Path, int, managers.Namespace] try: with Manager() as manager, worker_queue() as spawn_worker: rdfcache = build_rif_cache(sparql_uri) + wikicache = build_wiki_cache(sparql_uri) with database_connection(sql_uri) as conn: for chunk in group(query_sql(conn, serialize_sql( # KLUDGE: MariaDB does not allow an offset |