Hey Andras,
Yay, one I can help with although the credit really needs to go to
Sebastian who solved the issue when we came across it.
The issue stems from Haystack finding both the search_index in Oscar
itself and the one you have written that extends it. So all you really
need to do is tell haystack to ignore the one in Oscar.
So lets assume you new search_index is in myproject.search.search_index
and looks something like this:
from haystack import indexes
from oscar.apps.search.search_indexes import ProductIndex as
CoreProductIndex
class ProductIndex(CoreProductIndex):
brand = indexes.CharField(model_attr="brand", faceted=True)
# Other index field etc.
Within you settings file where you define the haystack config you need
to do the following:
# Haystack settings
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
'EXCLUDED_INDEXES':
['myproject.search.search_indexes.CoreProductIndex',]
},
}
This informs Haystack to exclude the search_index pulled in from Oscar.
Hope that helps.
Regards,
Jon
> --
>
https://github.com/tangentlabs/django-oscar
> ---
> You received this message because you are subscribed to the Google
> Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-oscar...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/django-oscar?hl=en-US.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Jonathan Moss
Director
Tangent Snowball Australia Pty
Suite 109
175 Sturt Street
Melbourne, VIC 3006
ABN: 76 137 883 615
T:
+61 (0) 3 9645 8796
M: +61 (0) 4 1525 1208
E:
jonath...@tangentsnowball.com.au