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

Fix Object type (resource type) search in OpenSearch #633

Open
sfisher opened this issue May 17, 2024 · 1 comment
Open

Fix Object type (resource type) search in OpenSearch #633

sfisher opened this issue May 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working OpenSearch

Comments

@sfisher
Copy link
Contributor

sfisher commented May 17, 2024

OpenSearch UI doesn't search for "object type" correctly.

It's hard to determine with our subset of data since a lot of things don't have it, but you can add items manually after looking at the development (running off the database).

Add items you know should show up in opensearch like:

python manage.py shell

import impl.open_search_doc as open_search_doc
from ezidapp.models.identifier import Identifier
open_s = open_search_doc.OpenSearchDoc(identifier=Identifier.objects.get(identifier='ark:/28722/k2kh0pq17'))
my_dict = open_s.dict_for_identifier()
open_s.index_document()

Some IDs that should have resource types are these:

ark:/38305/f100003k
ark:/38305/f1028phz
ark:/38305/f10c4sqg
ark:/38305/f10p0x8w
ark:/38305/f11834m5

I see resource.type as something like "image" but I think the search may need 'searchable_resource_type` which appears in the search table.

@sfisher sfisher self-assigned this May 17, 2024
@sfisher sfisher added OpenSearch bug Something isn't working labels May 17, 2024
@sfisher sfisher changed the title Fix Object type (resource type) search in OPenSearch Fix Object type (resource type) search in OpenSearch May 17, 2024
@sfisher
Copy link
Contributor Author

sfisher commented May 21, 2024

Jing and I looked into the code and it's confirmed that I need to add searchable_resource_type which is some character code which I believe can be derived from the identifier and kernel metadata (metadata) which is a parsed field from json and may be datacite.xml in json or something else. There are methods to handle it all in there somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OpenSearch
Projects
None yet
Development

No branches or pull requests

1 participant