Why does django-oscar need a search engine?

85 views
Skip to first unread message

Michael Slinn

unread,
Feb 12, 2021, 11:56:36 AM2/12/21
to django-oscar
Pardon me if I am asking a dumb question, but the docs just state what to do in order to configure search engines without ever saying why such a thing might be needed.

Why not use the database for retrieving product-related information? Does django-oscar sometimes/usually need to search documents for some reason? If so, what type of documents?

My use case is just one product with several parameters that is custom -made for each order. I do not expect to need a search engine for this, or is there something I need to learn about?

For which scenarios might a search engine provide value?

Thanks,
Mike

Michael Slinn

unread,
Feb 13, 2021, 8:34:13 AM2/13/21
to django-oscar

Comments are invited.

Mike

Ben Stähli

unread,
Feb 13, 2021, 8:43:38 AM2/13/21
to django...@googlegroups.com, Michael Slinn
you are free to use whoosh (my preference, normally...), or
elasticsearch (which is preferred nowadays, I heard...) as a backend!
but you're right, solr is a beast ,-.)
> --
> https://github.com/django-oscar/django-oscar
> http://django-oscar.readthedocs.org/en/latest/
> ---
> 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
> <mailto:django-oscar...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/django-oscar/98f713bd-dbd8-4e4e-a813-4ded53259f93n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-oscar/98f713bd-dbd8-4e4e-a813-4ded53259f93n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Ben Stähli
bn...@bnzk.ch
+41 22 575 25 77
bnzk.ch
--

Mike Slinn

unread,
Feb 13, 2021, 8:59:41 AM2/13/21
to Ben Stähli, django...@googlegroups.com
I do not believe that most ecommerce sites need fulltext search at all,
so for most people, I believe the answer is "none of the above".

Mike

Ben Stähli

unread,
Feb 13, 2021, 9:07:34 AM2/13/21
to django...@googlegroups.com
sure, your opinion. oscar decided to have haystack on board, sounds
legit for many bigger sites. docs to be fixed...that's it.

Mike Slinn

unread,
Feb 13, 2021, 5:22:40 PM2/13/21
to django...@googlegroups.com

Opinions are unimportant.

I wonder if any user-visible functionality would be altered in Frobshop if Haystack was disabled. I believe that the answer is that there would be no discernible difference.

Going one step further, are any statistics available about the total number of live sites running django-oscar, and the most popular features used?

Mike

Michael Slinn

unread,
Feb 15, 2021, 7:26:09 AM2/15/21
to django-oscar
I did some research and wrote up some suggestions:

Mike

meig...@meigallodixital.com

unread,
Feb 15, 2021, 9:06:24 AM2/15/21
to django-oscar
I think the real reason for putting haystack as standard is more for the facet indexes than for the searches themselves. But it permit the possibility of using search engines if is necessary too.

If you leave 'simplebackend' as it comes by default on the tutorial, you have the 'normal' search in database. But you obviously you lose the facet indexes.

As postgresql has its own search engine already and django 3.x supports it, there is open debate about this already in the repository [1] [2]. But in my opinion it's a Haystack's responsibility. Unless, as you say, the use Haystack as standard search is changed.

Michael Slinn

unread,
Feb 15, 2021, 9:34:35 AM2/15/21
to django-oscar
I agree that so long as Oscar's forms are hardwired to Haystack, implementing additional backends would be Haystack's responsibility. I am not advocating that this be changed, apologies if I was unclear. Please let me know what I wrote to cause that miscommunication and I will correct it.

I think that the Haystack `simplebackend` is misnamed because it only works with SQL databases, and Haystack would interface just fine with NoSQL databases if implementations were written. Those backends would also be simple (i.e. they would not necessarily support fulltext search), but they would also not use SQL. Perhaps Haystack could deprecate the term simplebackend in favor of sqlbackend. This would also help orient newbies.

Your usage of the term 'search engine' confuses me because all datastores by definition have an inherent search capability.

Mike

Michael Slinn

unread,
Feb 15, 2021, 9:57:10 AM2/15/21
to django-oscar
I rewrote the blog post to include the information exchanged with @meigallo.
Reply all
Reply to author
Forward
0 new messages