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 - Backend Implementation #14

Merged
merged 11 commits into from
Jun 6, 2023
Merged

Conversation

punith300i
Copy link
Collaborator

Added a Wikidata search extension, that internally uses Wikidata's APIs over their cirrus search ( elastic search )

Implemented the following search routes to search for classes, entities and properties by using their names (text based search :

  • /api/search/classes?q=" "
  • /api/search/entities?q=" "
  • /api/search/props?q=" "

As the API data had html text as part of the payload data, I have used nh3 module to clean the html texts and has been added to pyproject.toml as a dependency.

For the classes search implementation, the Wikidata API returned empty strings for the class label. The local class api was leveraged to extract label and description for the class search API.

Class Search API Test :

classes

Entity Search API Test :

entity

Property Search API Test :

props

@punith300i punith300i requested a review from binh-vu June 5, 2023 08:47
sand/extension_interface/search.py Outdated Show resolved Hide resolved
sand/extension_interface/search.py Outdated Show resolved Hide resolved
sand/extensions/search/wikidata_search.py Outdated Show resolved Hide resolved
sand/models/ontology.py Outdated Show resolved Hide resolved
sand/controllers/search.py Outdated Show resolved Hide resolved
sand/controllers/search.py Outdated Show resolved Hide resolved
sand/extension_interface/search.py Outdated Show resolved Hide resolved
sand/extension_interface/search.py Outdated Show resolved Hide resolved
sand/extensions/search/wikidata_search.py Outdated Show resolved Hide resolved
sand/models/search.py Outdated Show resolved Hide resolved
@binh-vu binh-vu merged commit 55ebb0a into master Jun 6, 2023
4 checks passed
@binh-vu binh-vu deleted the dev-wiki-search branch June 6, 2023 20:10
@binh-vu binh-vu mentioned this pull request Jun 18, 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.

None yet

2 participants