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

Adds generic search thumbnail retrieval #10266

Merged
merged 6 commits into from
Nov 28, 2023
Merged

Adds generic search thumbnail retrieval #10266

merged 6 commits into from
Nov 28, 2023

Conversation

aarongundel
Copy link
Contributor

Adds search thumbnails - to be implemented at the project level.

Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

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

This looks great. Just a couple unused imports to remove and I think adding that setting to the project template would be nice.

@@ -66,6 +66,7 @@

ELASTICSEARCH_HTTP_PORT = 9200 # this should be in increments of 200, eg: 9400, 9600, 9800
SEARCH_BACKEND = "arches.app.search.search.SearchEngine"
SEARCH_THUMBNAILS = False
Copy link
Member

Choose a reason for hiding this comment

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

This should also be added to the project template's settings file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,34 @@
from arches.app.models.resource import Resource
Copy link
Member

Choose a reason for hiding this comment

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

Remove unused import

from arches.app.models.resource import Resource
from django.views.generic import View
from django.http import HttpResponse, HttpResponseNotFound
from django.utils.translation import get_language
Copy link
Member

Choose a reason for hiding this comment

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

unused import

from django.views.generic import View
from django.http import HttpResponse, HttpResponseNotFound
from django.utils.translation import get_language
import requests
Copy link
Member

Choose a reason for hiding this comment

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

unused import

@@ -0,0 +1,39 @@
from logging import Logger
Copy link
Member

Choose a reason for hiding this comment

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

Logger is unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is used on line 17

Copy link
Member

@chiatt chiatt Nov 15, 2023

Choose a reason for hiding this comment

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

On 17 you are using 'logging' which is defined on line 8 imported from line 2. Logger itself is unused. I wouldn't have caught it myself had vscode not flagged it.

@aarongundel aarongundel requested a review from chiatt November 15, 2023 18:08
@@ -0,0 +1,16 @@
import base64
Copy link
Member

Choose a reason for hiding this comment

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

It's nice to have an example, but because this file isn't yet wired in as a default, I think it would be better to remove this here and add it to the docs.

@chiatt chiatt merged commit bc1695b into dev/7.5.x Nov 28, 2023
2 checks passed
@chiatt chiatt deleted the search-thumbnails branch November 28, 2023 00:24
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.

Present thumbnail of first canvas in a manifest in search results
2 participants