Module

Developer
Supported

Google Custom Search

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Derek Hogue

     

You must be logged in to post.

Using colon in search terms

General

ejaeDesign
ejaeDesign

Hi Derek,

On our test site, using a term with a colon (“Matthew 5:5” for example) only returns a single result:

https://dev.theologyofwork.org/about

Using regular GSE (not via Google Custom Search add-on), it returns a much wider set of results:

http://www.theologyofwork.org/test

Why are the results different?

Thanks!

Derek Hogue
# 1
Developer
Derek Hogue

Try this - open mod.google_custom_search.php, and on line 200 change:

$args['q'urlencode($keywords); 

to

$args['q'$keywords

And give it another try?

ejaeDesign
# 2
ejaeDesign

Thanks, Derek. That did the trick.

Another question for you. Can we use GCS add-on to simply bypass the string query in the URL (generated by default GSE)? For example:

https://dev.theologyofwork.org/search/some-segment/?search=my-search-term

There’s probably a workaround but having a hard time getting it to work with .htaccess + CE Cache,

Much appreciated!

Derek Hogue
# 3
Developer
Derek Hogue

Glad that worked. There’s no option to leave the search terms unencoded I’m afraid - there were too many issues using query strings with different EE setups.

petenice
# 4
petenice

Thanks you for that, it worked for me as well