-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement materialised queries in solr (#11)
- Loading branch information
Showing
219 changed files
with
10,833 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
dataload/07_run_queries/add_query_metadatas_to_graph_metadata.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
import json | ||
import sys | ||
|
||
def main(): | ||
graph_metadata_filename = sys.argv[1] | ||
query_metadata_filenames = sys.argv[2:] | ||
|
||
with open(graph_metadata_filename, 'r') as file: | ||
graph_metadata = json.load(file) | ||
graph_metadata['materialised_queries'] = [] | ||
for query_metadata_filename in query_metadata_filenames: | ||
with open(query_metadata_filename, 'r') as file: | ||
query_metadata = json.load(file) | ||
graph_metadata['materialised_queries'].append(query_metadata) | ||
|
||
print(json.dumps(graph_metadata, indent=2)) | ||
|
||
if __name__=="__main__": | ||
main() | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
import sys | ||
import pandas as pd | ||
import json | ||
|
||
def main(): | ||
data = [] | ||
for line in sys.stdin: | ||
line = line.strip() | ||
if line: | ||
obj = json.loads(line) | ||
for key, value in obj.items(): | ||
if isinstance(value, list): | ||
obj[key] = ';'.join(map(str, value)) | ||
elif isinstance(value, dict): | ||
obj[key] = json.dumps(value) | ||
else: | ||
obj[key] = str(value) | ||
data.append(obj) | ||
|
||
df = pd.DataFrame(data) | ||
df.to_csv(sys.stdout, index=False) | ||
|
||
if __name__ == "__main__": | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
dataload/08_create_other_dbs/solr/grebi_link_results/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
[package] | ||
name = "grebi_link_results" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
serde_json = { version = "1.0.108", features=["preserve_order"] } | ||
grebi_shared = { path = "../../../grebi_shared" } | ||
csv = "1.3.0" | ||
lmdb-zero = "0.4.4" | ||
bloomfilter = "1.0.13" | ||
jemallocator = "0.5.4" | ||
clap = { version = "4.4.11", features = ["derive"] } |
Oops, something went wrong.