-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fixing the indexing #4615
fixing the indexing #4615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after lint fixes. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update the signal here too: https://github.com/rtfd/readthedocs.org/blob/eric-search-upgrade/readthedocs/search/signals.py#L25
data = { | ||
'app_label': app_label, | ||
'model_name': model_name, | ||
'document_class': document_class, | ||
'index_name': index_name, | ||
'objects_id': list(chunk) | ||
'objects_id': chunk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be named chunk
I think?
I think we probably need to support both a list of object ID's for normal running, and also a start/end for reindexing perhaps |
@ericholscher Oops! I missed that! |
readthedocs/search/tasks.py
Outdated
def index_objects_to_es(app_label, model_name, document_class, index_name, | ||
chunk=None, objects_id=None): | ||
|
||
assert not chunk and objects_id, "You can not pass both chunk and objects_id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this needs a (chunk and objects_id)
to apply not
properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry! my bad!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher fixed!
👍 |
fixing the indexing
fixing the indexing
@ericholscher It should fix the search indexing!