sketchpacks / bug-reports

Noticed a bug? Report it here.
https://www.sketchpacks.com
6 stars 2 forks source link

Search Not Working #49

Closed Mediakik closed 6 years ago

Mediakik commented 7 years ago

Platform: Sketchpacks for macOS Version:

Steps to reproduce

Go to browse and type in SYMBOLS

Current behavior

It provides results, but none of them have symbols in the title - it's very hard to tell if the results are even relevant.

Expected behavior

I should see results of all plugins that relate to symbols and have symbols in the actual title.

Workaround

I have tried performing a search on other plugin types and it's really a missmatch of plugins. Not sure how your search works, but could do with some refinement.

willdavis commented 7 years ago

@Mediakik thanks for the feedback! I've made a couple updates to searching so you should be seeing more relevant results now.

The problem was with the search indexing. Originally, the plugins readme's were being added to the search index. So what was happening was that commonly used words in the readmes were flooding the search results, making them less useful.

To fix this, I removed the Readme from the search index. Now when you search for terms like symbol you will only find plugins with that word in their name, title and description attributes.

We're using PostgreSQL weighted text searching and indexing using a text search vector. This gives us a good middle-ground so we can provide partial word matches without needing to go for the full ElasticSearch or similar engines. It's also super efficient on the DB 👍