divio / aldryn-search

Haystack 2.0 search index for django CMS
Other
48 stars 77 forks source link

How to enable real time index updates of text plugin contents? #58

Closed trawick closed 8 years ago

trawick commented 8 years ago

I'm using HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' and anticipate that searching for some text is successful within a few seconds of publishing a page that has the text.

What is the expected behavior when changing text plugin contents with real time updates?

Django==1.7.10
django-cms==3.1.4
aldryn-search==0.2.10
Python 3.4.3
etc.

TIA!

czpython commented 8 years ago

@trawick Sadly because real time indexing relies on save signals, it's very unpredictable because saving an object doesn't mean it should be added to the index.

As of 5542b9f84fd530b0d812fdec73a62bd34a5d02a3 I've made this more explicit.

The page index is only created/updated when the page is published. The page is removed from the index if it's unpublished.

This means that changing the title of a page or modifying a plugin will not touch the index until the page is published.

trawick commented 8 years ago

Hello again, sorry for the delay in responding, thanks for the fix, etc.

Is it intended for the project configuration to now use

HAYSTACK_SIGNAL_PROCESSOR = 'aldryn_search.signal_processor.RealtimeSignalProcessor'

?

(I didn't realize before that there was a signal processor within aldryn-search -- AldrynSignalProcessor)

Thanks!

czpython commented 8 years ago

Yes in order for realtime indexing to work correctly you'll need to use the Aldryn search realtime signal processor as shown above.

trawick commented 8 years ago

Thanks a lot!

vinitkumar commented 5 years ago

@czpython I tried using the same settings HAYSTACK_SIGNAL_PROCESSOR = 'aldryn_search.signal_processor.RealtimeSignalProcessor' . But seems like it is not working correctly. Any suggestions?