[HN Gopher] A journey in e-commerce search
___________________________________________________________________
A journey in e-commerce search
Author : danpalmer
Score : 27 points
Date : 2023-01-15 18:21 UTC (2 days ago)
(HTM) web link (danpalmer.me)
(TXT) w3m dump (danpalmer.me)
| habibur wrote:
| My solution to this problem had been to put the category name and
| all other product attributes in a full text search field and then
| index it. So that a search for "blue shirt" will select all shirt
| even if the title doesn't include it.
|
| And then adjust what to return by putting "and" or "or" in
| between keywords based on the search engine's behavior.
| jrochkind1 wrote:
| I don't totally understand that middle step "So why not search
| filters instead of products". It just means searching over the
| human-edited metadata instead of free-for-all free text fields
| that were scraped from who knows where?
|
| When we get to the last step, of implementing bitmaps for
| filters, and then trying to optimize to deal with the RAM
| implications... why not just use Solr or ElasticSearch instead of
| reinventing the wheel? That's basically what lucene (which Solr
| and ES are built on) is doing, something like that implementation
| you came up with, but with lots of optimizations and tunings on
| top of the naive implementation.
| polyrand wrote:
| Interesting approach, thanks for sharing!
|
| If I understood correctly, a user query is first applied to the
| `SearchItem` table (using the `search_vector` field?). Then the
| returned `filters` are used to generate a normal (not full-text
| search) SQL query that would retrieve items from the product
| table?
| skimdesk wrote:
| Recently had a good experience with Typesense [0] for
| implementing ecommerce search. We solved the "blue shirts"
| problem by grouping a products color variants together using
| `group_by` and ranking by text match. The best "matching" shirts
| are then likely blue. This is a bit simplified, and not exactly
| the same case, but it worked surprisingly well.
|
| [0] https://typesense.org/
| troelsSteegin wrote:
| Question: are they using "filters" as facets or what FAST called
| refiners? That's the impression I had on a read through. Endeca
| (now something inside Oracle) had some early success with faceted
| search for ecommerce.
| larrik wrote:
| As someone also dealing with "your search sucks", I felt all of
| this pain.
|
| I think sticking with Postgres was a mistake, though.
| Denormalizing into something like ElasticSearch would probably
| have gotten you further (and it's so fast).
|
| Searching the _filters_ is pretty clever, though.
___________________________________________________________________
(page generated 2023-01-17 23:01 UTC)