diff --git a/src/components/explore/Explore.svelte b/src/components/explore/Explore.svelte
index 3e5a016..c1768ee 100644
--- a/src/components/explore/Explore.svelte
+++ b/src/components/explore/Explore.svelte
@@ -194,7 +194,7 @@
// Perform search in real timebased on searchTerm here
}
- ;(async function entered(e) {
+ async function entered(e) {
const searchclient = new MeiliSearch({
host: 'https://ms-9ea4a96f02a8-1969.sfo.meilisearch.io',
apiKey: '117c691a34b21a6651798479ebffd181eb276958'
@@ -205,13 +205,12 @@
// const searchResult = await index.search('orgs', {
// attributesToRetrieve: ['id']
// })
- const searchResult = await index.search(e.target.value.toString(), {
- attributesToRetrieve: ['id']
- })
-
+ const searchResult = await index.search(e.target.value.toString())
+console.log(searchResult.hits)
// need to turn the search results into an array of ids which can be used to query the knowledge graph
const resultsgraph = await generateKnowledgeGraph(searchResult.hits).then(
resultsgraph => {
+
const allNodes = resultsgraph.entities.map((entity: any) => ({
data: { id: entity.id, label: entity.label }
}))
@@ -271,7 +270,7 @@
'dGVybWludXNkYjovLy9kYXRhL2tleXNfYXBpLzJkMDU4N2IwYjgzMzhmODdjMjc0ZDdiNmM1MzgwNjFmYTYyMmZkOTcyZTc3NjI1NzIyYjY3MTllYTE3NmQxYjE=_bd6f9c37d87abcaf0c16b7a68335b31010c8dd04aac0b07bf0f31676af131888666200aac080e72cdc746197334eac4f52d821c90652b5611784878afabe1267535cbd896a00a396'
}
)
- await client.connect()
+ await client.connect()
// let v = WOQL.vars('person_id', 'impactarea', '@schema:checked');
// const WOQL = TerminusClient.WOQL
@@ -294,7 +293,7 @@
// console.log('result ', result)
// const results = await client.query(query)
// console.log('Query Documents using WOQL: ', results.bindings)
- })()
+ }
diff --git a/src/components/explore/cytoscape.ts b/src/components/explore/cytoscape.ts
index ed91f0b..f67afdd 100644
--- a/src/components/explore/cytoscape.ts
+++ b/src/components/explore/cytoscape.ts
@@ -5,150 +5,121 @@ import * as fs from 'fs'
const WOQL = TerminusClient.WOQL
-export async function generateKnowledgeGraph(ids: unknown[]): Promise