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

fixing the indexing #4615

Merged
merged 5 commits into from
Sep 7, 2018
Merged

Conversation

safwanrahman
Copy link
Member

@ericholscher It should fix the search indexing!

Copy link
Member

@ericholscher ericholscher left a 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. 👍

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

data = {
'app_label': app_label,
'model_name': model_name,
'document_class': document_class,
'index_name': index_name,
'objects_id': list(chunk)
'objects_id': chunk
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 be named chunk I think?

@ericholscher
Copy link
Member

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

@safwanrahman
Copy link
Member Author

@ericholscher Oops! I missed that!
updated to support both chunk and objects id.

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"
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry! my bad!

Copy link
Member Author

Choose a reason for hiding this comment

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

@ericholscher fixed!

@ericholscher ericholscher merged commit 3ca137c into readthedocs:search_upgrade Sep 7, 2018
@ericholscher
Copy link
Member

👍

safwanrahman pushed a commit to safwanrahman/readthedocs.org that referenced this pull request Sep 15, 2018
safwanrahman pushed a commit to safwanrahman/readthedocs.org that referenced this pull request Sep 15, 2018
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