Search for Ghost

Thank you for your additional information and yes you are right David on the substance everything is possible.

Nevertheless GhostHunter is a third party solution, even if it integrates with Ghost via APIv2 (with a dirtyfix…).
It has not been and is not developed by the Ghost Team and does not integrate the core standard.

For multi-language, this is still quite limited and especially requires adding about 15 to 20KB of additional code per language.

This kind of solution quickly becomes gargantuan.

What we thought when the tag went to “planned” is that when Ghost updated it would integrate its own search function, hence the term build-in.

And if I understand your answers correctly, it no longer seems on the agenda, yet many users want to see this basic integrated function.

But I understood with a time, some task become more important and some other less.
Anyway, thank you for your reply and your time to answer too and waiting about new updates and new functions in Ghost.

1 Like

How is the Search function not a priority? The whole point of a blog is literally searching for relevant information, lol.
I guess the non-technical bloggers like me are screwed, since I don’t understand how to integrate the solutions above, well, good for me.

I have the same concern… I would use the default blog if there was a search built into it.

I ended up using this theme which has search built in and they show you how to get search working in an easy manner.

1 Like

Hi, ravingDIODE, I already installed another theme, but I will check the tutorial to see if I can implement the search functionality on my own too, thank you for sharing.

1 Like

So after the new Ghost 3.0, the theme I was using does not work correctly I don’t know how to fix it.

So now I am back to the default casper theme and I was really hoping that search would have been included into the new casper theme with ghost 3.0.

Is there any ETA on when we can expect the search functionality to be added?

Oh, right! I have to update to 3.0!

Someone helped me with the whole installation process but since he’s gone, I’ll have to do it myself. Is it really necessary though? Since I was expecting the search functionality embedded onto this version and it’s not, I’m not sure I even need to do the update, or do I?

Also, are they even trying to implement this function or… lol

As you can see in the topic subtitle, this function is “planned” not yet “in-progress

I also look forward to it, in the meantime I suggest Algolia, at the moment it is the best, everything you imagine you want to do, with algolia you can do it. He has a free plan.

1 Like

Yes please! Do a search box for Casper same good as internal search box :pray:
That’s the best solution!

+1 for this.
I built my blog written in japanese and found that the search didn’t work.
I hope ghosthunter search will be available in any languages!

Hello :smile:

@hiyukoim - Use the search that I use for my free themes for ghost. It is a search engine that supports almost all languages.

The demo you can see in my blog

1 Like

Thank you for your suggestion :smiley:
Is it Ghost search?

I added it to my site and tried, but it still not working with Japanese characters (and probably some other Unicode characters).
Probably that’s related to how we type our characters.
We type pronunciation with the roman characters first and then convert them to Unicode characters. Maybe the search has to be able to handle those characters.

:thinking: I think this works.

You can download one of my themes and try. If it doesn’t work then contact me to help you.

1 Like

Oh heck, there are too many options! I’ve spent most of today implementing search into my own Ghost blog…what can I say, it took too long with too many stumbling blocks and I’m still not happy. Reading through this forum I was (and still am somewhat) confused about what options exist as of now to implement this needed feature. This is what I’ve found - I hope it helps someone.

  1. Add google custom search: this is actually a good solution even if the end result is pretty…ugly. By this I mean that the search results will appear Google-style and will not match your blog theme. But in terms of practicality (such as the relevancy of results) it should give possibly the best results.
    Adding Search to Ghost on GhostForBeginners.com
  2. Integrate ElasticSearch (or some other server-side search library): this is the most complicated path to take. Since the search happens on the server-side, for large blogs this and Google may be the only performant solutions.
    Intégrez ElasticSearch comme moteur de recherche à votre site Internet
  3. Make use of a JavaScript-based solution. These basically download all of your posts to the user’s browser and perform the search there. If you want to enable searching through your post contents, not just your post titles, then this approach can lead to issues once you have a lot of blog posts. I’ve found three such libraries
    1. Ghost Finder: this is the newest of the three, first published to GitHub in October 2019. It also has the fewest stars/commits, but maybe that’s just because it hasn’t been around that long. I haven’t tried implementing it but it looks promising.
      Add search option to ghost theme
      How to Add search option on ghost theme
    2. HauntedThemes/ghost-search: this is the second-newest, published on September 2018. It is the search used for example in the Zvikov theme. It is an improvement on the original search library for Ghost below. Instead of lunr.js, it uses fuzzysort. I’ve implemented this theme in my blog, however, I occasionally ran into issues with search phrases that were over 6-7 characters long. The browser would freeze for 12-16 seconds.
      ghost-search: Our First Open Source Library for Ghost
    3. jamalneufeld/ghostHunter: this is the oldest library with the most stars and commits. However, as I found out, it is not at all easy to work with.
      How to Add Search to Ghost Using ghostHunter
      How to add GhostHunter Custom Search in Ghost Theme
      How to Add Search to Ghost Using GhostHunter

Regarding ghostHunter, you can read a more detailed blog post on this topic where I detail some of the issues I ran into while implementing it on my site.

5 Likes

Thanks for sharing this, it’s very valuable feedback. The ghostHunter project seems to be the most popular out of them all, did you find performance issues with it besides having difficulties implementing it? After reading your article it appears that if you go with client-side search you have to consider there will be a limit in content size before it starts becoming slow, but if you go with server-side you face more complexity with implementation. ghostHunter is client-side, but tries hard to gain performance improvements at the cost of being more complex to implement.

I have been using Site Search 360 for my Ghost blog, with a modified Casper theme. I realize ours is a low activity, low post count blog that fits into their free plan, but I figured I’d post it here in case it might work for others seeking a search function. It was simple to set up (uses server-side search), with dozens of configuration options. You can see it here.

1 Like

Thanks very much for sharing this tool. We’ve put together a tutorial on how to use Site Search 360 as we found it the most approachable and provided the most control:
https://ghost.org/tutorials/adding-search-to-a-ghost-theme/

Hope this helps people in adding search to their own site. Any feedback is appreciated, thanks! :wave:

2 Likes

Good job on the tutorial. I would just like to point out some more configuration settings that you might want to do. These are done on the Site Search 360 website itself for your account. Most of these are specific to my implementation using a modified Casper theme.

First, check out the Crawler Settings under the Index Control tab. I turn on the “Skip Homepage” setting because the user’s search terms will probably be captured in the home page card for a post as well as in the post itself, so it would produce duplicate entries in the search results if the homepage is included in the indexing.

Next, scroll down on that page to the “Content Extraction” -> “Include Content Xpath(s)” and enter the following: “//section[contains(@class,‘post-full-content’)]” (without the quotes). This tells the crawler that I only want to index content in a section with a class of 'post-full-content" which in the Casper theme is where the content of the post is inserted in the post.hbs template. This way my user will only be searching within actual post content, and not picking up extraneous keyword matches elsewhere.

There are many other configuration options that may apply to your particular blog. For example, ours is used for our financial advisory firm, so I have added a dictionary entry that matches the word “adviser” to “advisor” in the index. We use the second spelling in all our text, but “adviser” is a common spelling that might be used by someone searching on our blog.

2 Likes

Wow this is great info, thanks for sharing :raised_hands:

Ps. Thanks for the kind words on the tutorial

Hi everyone, I found this topic really interesting so I wanted to help the next readers with my small contribution.

If you didn’t find the perfect solution with everything said before, maybe you can give a try to SearchinGhost. It is a client-side search option and there is a comparison (pros & cons) with GhostHunter, Ghost-search and Ghost Finder at the end of the README.

I am the author of this plugin so if you struggle to install it, need any extra support or found something is missing, please contact me!

Hope it can be useful to anybody :grinning:

15 Likes