Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Add basic search index #72

Merged
merged 6 commits into from
Feb 16, 2015
Merged

Add basic search index #72

merged 6 commits into from
Feb 16, 2015

Conversation

yakky
Copy link
Contributor

@yakky yakky commented Feb 4, 2015

This allow for indexing using haystack

@yakky
Copy link
Contributor Author

yakky commented Feb 4, 2015

Ping @mikek @intellectronica for comments

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.17%) to 90.3% when pulling 25dcd61 on feature/search_index into 63b8ab2 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.17%) to 90.3% when pulling 25dcd61 on feature/search_index into 63b8ab2 on master.

@intellectronica
Copy link
Contributor

Looks good.

I wonder if we should also add the categories, tags and authors to the free text. Might be nice to be able to search for them.

@yakky
Copy link
Contributor Author

yakky commented Feb 4, 2015

Do we need to handle this in newsblog, or rather in aldryn-categories?

@intellectronica
Copy link
Contributor

Not sure how you could do that in the categories app (with the result that you find blog posts, not categories).

@mikek
Copy link
Contributor

mikek commented Feb 4, 2015

@czpython can you, please, have a look this: what can be considered a generic enough to add to blog search index?

if obj.content:
plugins = obj.content.cmsplugin_set.filter(language=language)
for base_plugin in plugins:
instance, plugin_type = base_plugin.get_plugin_instance()
Copy link
Contributor

Choose a reason for hiding this comment

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

please use get_plugin_index_data since it has certain rules to know what to index, to keep consistent accross all apps, this function cleans the plugin data and returns a list that you can then use to extend the text_bits list.

@czpython
Copy link
Contributor

czpython commented Feb 4, 2015

categories, tags, authors should be added here, not in the categories app.

@yakky
Copy link
Contributor Author

yakky commented Feb 4, 2015

Thanks @czpython, will comply

@yakky yakky self-assigned this Feb 4, 2015
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.13%) to 90.34% when pulling b867838 on feature/search_index into 63b8ab2 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.13%) to 90.34% when pulling b867838 on feature/search_index into 63b8ab2 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.33%) to 90.24% when pulling 26d9559 on feature/search_index into d90e2a4 on master.

@yakky
Copy link
Contributor Author

yakky commented Feb 6, 2015

@czpython probably we should change a bit aldryn_search to better support parler. See https://github.com/aldryn/aldryn-newsblog/blob/feature/search_index/aldryn_newsblog/search_indexes.py#L24

parler requires the use of qs.translated instead of qs.filter

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.19%) to 93.38% when pulling 66136b7 on feature/search_index into d90e2a4 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.46%) to 94.03% when pulling 0215c15 on feature/search_index into d90e2a4 on master.

@yakky
Copy link
Contributor Author

yakky commented Feb 8, 2015

@czpython @mikek complete on my side

@czpython
Copy link
Contributor

LTGM 👍

yakky added a commit that referenced this pull request Feb 16, 2015
@yakky yakky merged commit a957408 into master Feb 16, 2015
@FinalAngel FinalAngel deleted the feature/search_index branch March 22, 2015 14:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants