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

DraftailTextBlock to be searchable #24

Merged
merged 2 commits into from
Apr 3, 2017

Conversation

dnsl48
Copy link
Contributor

@dnsl48 dnsl48 commented Mar 22, 2017

Currently DraftTextBlock returns its JSON stuff as the searchable content.
We want it to be the rendered document instead.

@dnsl48 dnsl48 self-assigned this Mar 22, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 9.783% when pulling cdd1020 on feature/block_to_be_searchable into ae5a43a on master.

@loicteixeira
Copy link
Contributor

loicteixeira commented Mar 22, 2017

It's a bit of a bummer that we have to render the html to then strip it but I don't see how else it can be done. The JSON structure doesn't seem very easy to traverse.

Would DraftailTextField need the same fix?

@dnsl48
Copy link
Contributor Author

dnsl48 commented Mar 22, 2017

Yes, the text field implementation should be updated as well.
I'm also going to implement some tests. Will be doing things within this PR.

@dnsl48
Copy link
Contributor Author

dnsl48 commented Mar 22, 2017

About having to render the content first - it's not a biggie, since wagtail database search backend doesn't support extra fields anyways, whereas Elasticsearch takes the stuff from fields only once - at the indexing stage (it's either on model update, or even in a celery/cron background job)

@loicteixeira loicteixeira force-pushed the feature/block_to_be_searchable branch from cdd1020 to 5932461 Compare April 3, 2017 22:04
@loicteixeira
Copy link
Contributor

Will add tests as part of in #27.

@loicteixeira loicteixeira merged commit 31039bc into master Apr 3, 2017
@loicteixeira loicteixeira deleted the feature/block_to_be_searchable branch April 3, 2017 22:07
@loicteixeira loicteixeira removed their request for review April 21, 2017 04:44
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

3 participants