-
Notifications
You must be signed in to change notification settings - Fork 3
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
IndexJob model #1699
Open
lukavdplas
wants to merge
36
commits into
develop
Choose a base branch
from
feature/index-job-models
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
IndexJob model #1699
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove tasks method
lukavdplas
added
backend
changes to the django backend
affects-deployment
changes that require an update in the deployment module
labels
Nov 13, 2024
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-deployment
changes that require an update in the deployment module
backend
changes to the django backend
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an
IndexJob
model to track indexing commands -> close #1696The
IndexJob
describes a set of index-related tasks. (E.g. create new index for a corpus, populate it with documents, and update the alias.) Tasks are broken up intoIndexTask
models.At this point, the
IndexJob
is essentially a log for theindex
andalias
commands; you can't create a job and then run it. Also, the model does not include status tracking. I'll tackle these in #1697Functions related to indexing commands are refactored. The
index
andalias
now create anIndexJob
to describe the command, and then callperform_indexing(job)
to run it. This makes up the most hefty changes in code, as it separates "figuring out what to do" from actually doing it.There is a new
indexing
app which contains indexing-related models. This was to keepmodels.py
from becoming too bloated. Functions and commands related to indexing should probably be moved to this app eventually, but I did not do that here.The
index
andalias
commands still work as before, with a few slight changes toindex
:--add
, like you would in production mode. Runningpython manage.py index mycorpus
when the index already exists will raise an error, unless you use--delete
or--add
.--update
no longer excludes the option to use--rollover.
(the crowd goes wild)Small addition:
min_date
/max_date
in a Python corpus definition as adate
type instead ofdatetime
. Though individual corpora may still implementsources()
in a way that doesn't support this.Deployment configuration
The
'indexing'
app must be added in the project settings.