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

Extract ID prefix into a separate method. #952

Merged
merged 2 commits into from
Jul 30, 2019

Conversation

heaven
Copy link
Contributor

@heaven heaven commented Jul 27, 2019

Useful sometimes to get record's ID prefix from third-party libraries.

For example, we use an index queue for background indexing and it uses Sunspot.remove_by_id, which stops working once we add an ID prefix, because in the index we get USA!Profile 123 while remove_by_id tries to remove Profile 123.

# ==== Returns
#
# String:: ID prefix for use in index ID to control shards
# a document ise stored on
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, yes, will fix now.

@serggl serggl merged commit 2fe3975 into sunspot:master Jul 30, 2019
@heaven heaven deleted the composite_id_update branch August 12, 2019 16:45
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.

None yet

2 participants