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

Wikidata Elastic Search - Frontend Implementation #20

Merged
merged 46 commits into from
Jul 2, 2023

Conversation

punith300i
Copy link
Collaborator

Integrated Wikidata Search Backend APIs to the frontend UI.

  1. Updated the following components :
  • NodeSearchComponent
  • OntSearchComponet

NodeSearchComponent adds source and target classes/entities to the semantic model knowledge graph.
OntSearchComponent adds class/entity/property to the semantic model knowledge graph.

  1. Updated each of the stores to have a callback async function that uses axios to fetch the backend Wikidata API search results.

The search implemented using OntSearchComponent completely uses the Wikidata API, unlike the previous implementation where there was ID based search from the local KG dump.

Property Search

Screenshot 2023-06-26 at 9 22 04 PM

Entity Search

Screenshot 2023-06-26 at 9 21 26 PM

Class Search

Screenshot 2023-06-26 at 9 21 16 PM

Source Node Search (Class)

Screenshot 2023-06-26 at 9 31 01 PM

Target Node Search (Class / Entity)

Screenshot 2023-06-26 at 9 31 27 PM

punith300i and others added 25 commits June 17, 2023 20:00
…d class, entity search of the existing nodes
@punith300i punith300i requested a review from binh-vu June 27, 2023 04:39
sand/extensions/search/wikidata_search.py Outdated Show resolved Hide resolved
www/src/components/search/LabelComponent.tsx Outdated Show resolved Hide resolved
www/src/models/entity/EntityStore.ts Outdated Show resolved Hide resolved
www/src/models/ontology/ClassStore.ts Outdated Show resolved Hide resolved
www/src/models/ontology/PropertyStore.ts Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/models/entity/EntityStore.ts Outdated Show resolved Hide resolved
www/src/models/ontology/ClassStore.ts Outdated Show resolved Hide resolved
www/src/models/ontology/PropertyStore.ts Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/models/entity/EntityStore.ts Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/models/entity/EntityStore.ts Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
onSearch={onSearch}
filterOption={(inputValue, option) => {
if (option!.type != "class") {
let label = option?.filterlabel!;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewrite line 146 to 158 to something like: return inputValue.split(" ").some(...);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no question mark. also convert toLowerCase here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the replacement is still incorrect

www/src/pages/table/OntSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
www/src/pages/table/NodeSearchComponent.tsx Outdated Show resolved Hide resolved
onSearch={onSearch}
filterOption={(inputValue, option) => {
if (option!.type != "class") {
let label = option?.filterlabel!;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no question mark. also convert toLowerCase here.

onSearch={onSearch}
filterOption={(inputValue, option) => {
if (option!.type != "class") {
let label = option?.filterlabel!;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the replacement is still incorrect

inputValue
.toLowerCase()
.split(" ")
.map((value) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use some(..)

@binh-vu binh-vu merged commit c427fe6 into master Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants