Module

Archived
Forum
(read-only)

Google Custom Search

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

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

     

How do I pass search parameters to google?

Feature (Resolved)

Dave F.
Dave F.

I’m looking to make my search results be sorted by date, most recent first.

From what I can tell, if I pass the parameter “sort=date-sdate” to google, it’ll spit it back to me in reverse chronological order. Is there a way I can have my searches default that way?

Thanks.

Derek Hogue
# 1
Developer
Derek Hogue

Thanks for this, it just made me look further into this feature (which the module does not currently support).

It looks like sorting, biasing, and filtering can only be done with Page Map attributes, which are abstract and non-standard (and hence difficult to add support for). But there is a special “date” attribute which Google infers from date-based information on each page, so we can I think use that for sorting, biasing, and filtering, which would be a great addition.

I’ll work on this a bit and get it into an update - can’t promise when though. But this would be great for one of my own clients, so I’ll get to it sooner rather than later.

Dave F.
# 2
Dave F.

Thanks. My client would be very happy with me if I could make it work the way they want.

Derek Hogue
# 3
Developer
Derek Hogue

Just added this in version 1.1.5. See the new parameters in the docs.

Dave F.
# 4
Dave F.

Awesome. I’m trying it out now. Thanks for the wicked fast turn-around.