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

Customize PageIndex #15

Open
xmedia-systems opened this issue Jun 18, 2012 · 3 comments
Open

Customize PageIndex #15

xmedia-systems opened this issue Jun 18, 2012 · 3 comments

Comments

@xmedia-systems
Copy link

Which way would you recommend to customize the page index created by cms_search? I'd like for example to set the text field to EdgeNgramField or make the title field indexable.

@beniwohli
Copy link
Owner

Hi,

as far as I can tell, this is not really in scope of django-cms-search. You'll probably have to look at haystack for this (e.g. https://groups.google.com/forum/?fromgroups#!topic/django-haystack/j6f-z_-XQWE)

Kind regards,
Benjamin

BTW: this is not really the place to get support, but to report issues and feature requests.

@xmedia-systems
Copy link
Author

Hi,

thank you for the quick reply! Well, the issue I'm having with django-cms-search is that only whole words are found in the index but not word parts. Autocompletion is also impossible. The quick and dirty solution is to change line 56 in search_indexes.py to

 text = indexes.EdgeNgramField(document=True, use_template=False)

instead of

 text = indexes.CharField(document=True, use_template=False)

but I'm looking for a better one. Like for example supplying an own base class for index and doing some magic in prepare(). Thought you have one in mind. If not I would like to request (and help to implement) such feature. For example make an option for supplying a custom page_index_factory.

Regards
Alexey

@beniwohli beniwohli reopened this Jun 19, 2012
@beniwohli
Copy link
Owner

Ah, got you. I guess we could move the field definitions into a configurable base class.

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

No branches or pull requests

2 participants