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

Availability facet #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Availability facet #138

wants to merge 2 commits into from

Conversation

psaiz
Copy link
Contributor

@psaiz psaiz commented Feb 3, 2025

Addresses #118

@psaiz psaiz requested a review from zzacharo February 3, 2025 10:11
):
_query = _query & ~dsl.Q("match", **{"distribution.availability": "ondemand"})

# if (
Copy link
Contributor

Choose a reason for hiding this comment

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

can be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've put it back, since the tests were not happy. If we remove this, we break backward compatibility if a user was searching through this field

f.delete()
elif "type" in file and file["type"] == "index.txt":
# The txt indexes should be ignored. Just delete the file
f.delete()
else:
real_files.append(file)
try:
obj = ObjectVersion.create(record.bucket, filename, _file_id=f.id)
obj = FileObjectCold.create(record.bucket, filename, f.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
obj = FileObjectCold.create(record.bucket, filename, f.id)
obj = FileObjectCold.create_version(record.bucket, filename, f.id)

just to separate the creation of a file obj and file object version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, thanks! I'll address this on #137 (this PR included two commits, the one of 137 and another one based on that one).

"""Overwrite the fileobject to get multiple URI and availability."""

@classmethod
def create(self, bucket, filename, file_id):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
def create(self, bucket, filename, file_id):
def create_version(self, bucket, filename, file_id):

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.

2 participants