Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Search function not working with one word

Hello,

I created a page with the content test. When I try to search on this page there are no results. But when I add more test's on that page the search function works perfect.

How can I search on a word which has been mentioned once? Sometimes it can be a important word for a visitor to search on.

Regards, Jacob

Maybe related to this? https://github.com/forkcms/forkcms/issues/1327

Yes that was one of the problems, thanks!

But no I have another problem. When you try to search is the search case sensitive. How can I resolve this problem?

Try this: http://www.regiototaal.nl/zoeken?form=search&q=BHV&module=Profiles&submit=Zoeken

And then this: http://www.regiototaal.nl/zoeken?form=search&q=bhv&module=Profiles&submit=Zoeken

As you can see, one of the searches has a result and the other doesn't.

Hmm probably change in this file term: query to term: query.toLowerCase() or so. I'll test this this evening and make a pull request, seems only logic that search should be case insensitive...

No that is not the problem. Because when I enter uppercase it will find the value in the database because it is written in uppercase and not lowercase.

Did a quick test with a fresh install and the blog module with a page with an uppercase word, and I could find the page/blogpost by either typing the word in lowercase or uppercase. And your two links give me both the wanted result, hmm.

If this is still an issue, maybe you can ask it on Slack ?

I think I found my problem. I search through specific modules but the search module creates a cache file for each search term and not for the module. So I added the module to the cache filename and I think that this solved my problem.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/