3 ms·
The biggest thing I've learned about search is to be very precise about WHAT is being searched. In my experience most people are very loose with this, but by be
by danpalmer 5y ago
The biggest thing I've learned about search is to be very precise about WHAT is being searched. In my experience most people are very loose with this, but by being really precise you can skip past a lot of bad search experiences.
Take clothing search, "blue t-shirt", what is the search space? Most engineers would naively shove the name/description into Elastic Search and then be surprised when it doesn't work. Why? Because most product descriptions are not as explicit as "This is a blue t-shirt" (see also YouTube video descriptions).
What we actually found was that by searching categories (where blue t-shirts is roughly a category), and then just filtering clothing items to that category, search worked far better. Understanding what terms people used (categories/colours) and what was actually in the data and what data models we should be searching (not products!), we built a far more effective search experience.
- dotancohen 5y agoOne strategy for this is to parse the search string for facets. Presumably there would be a facet for "t-shirt" and another facet for "blue", modulo synonyms and typos. Selecting those facets should give very good results, even without hitting the full-text search.
- danpalmer 5y agoYes that's a good option, but it still requires that you've got the facets in the index. I'm surprised at how many people say "just use postgress full-text search" without thinking through what information will actually be made available to search, for example.
- dotancohen 5y agoNo, I'm not saying to have the facets in the index. I'm saying to parse the search text for facets, and to search on the facets. If the whole string matches facets, then the full text search never gets touched, as in the example above. But if the example were e.g. "blue anime t-shirt" then you could facet on "blue" and "t-shirt" while FTS only has to contend with "anime".