Native search doesn't include post contents?

Just updated to a new theme on the latest version of Ghost, which includes native search, but when I test it out, it doesn’t seem to actually search the content of posts. Just the titles, excerpts, tags, and authors.

That seems like a major drawback of migrating to this instead of the former search workarounds… Am I seeing a bug or is this actually a limitation of the new feature?

This is mentioned in the official announcement:

It still comes with a few limitations, though. The search feature indexes post titles, excerpts, authors and tags - but it does not search across post content, and it can only index 10,000 posts to make sure the performance is blazing-fast. These limitations are where the difficulty of implementing a search feature goes from “relatively easy” to “oh shit”.

I’m guessing indexing something long like the text content takes a lot more work, both for developers and for the server, which is why they avoided it this time. According to the same announcement,

Our plan for the next iteration of Search is to make it extensible, so the UI remains largely the same - but it will be possible to completely replace the back-end search functionality and index with something more technically sophisticated (like Algolia) for large/hungry publishers who need even more power.

So I guess we’d have to wait for that to get native full-text search in Ghost. If you already have a third-party workaround set up, and need full-text search, I guess you should stick with that! Of course, since Ghost 5 released their default Content API key thing which native search uses, hopefully the third-party search solutions will upgrade to use it too and make setup simpler:

A handful of clever, well-implemented 3rd party search plugins for Ghost had popped up — but they all had the same limitation: The site owner would have to go and manually generate an API key, then edit their theme files manually, and paste in the key to get Search working. Not the best experience.

This all changed in Ghost 5.0 — as we added a default Content API key, included automatically and by default in every Ghost front-end.

I’m not sure of the details, but basically, native search has been made more seamless, and in the process things have changed in the backend which will allow third-party plugins to become more seamless too :wink:

2 Likes

Thanks! I did switch back to a plugin, but I didn’t notice Ghost had told us in the announcement. My bad.

1 Like

Of course, no worries. Glad I could be of help :slight_smile: