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

     

Extra Results Returned when Using Module

Support (Resolved)

aiswebservices
aiswebservices

For example, when searching on my site using the module for the term “Indiana”, I get 97 results. When using the preview directly from the Google CSE control panel, I only receive 7 results (which seems more accurate). Can you let me know why the module might be returning the extra results?

aiswebservices
# 1
aiswebservices

Just checking back in on my issue. Please let me know if I might have posted in the wrong area.

Derek Hogue
# 2
Developer
Derek Hogue

What parameters are you adding to the results tag? Are you adding any filters?

aiswebservices
# 3
aiswebservices

Hi Derek,

My results tag is as follows:

{exp:google_custom_search:results 
 cse
="000989529549511469574:6kyh8vor5kg" 
 
api_key="xxxxx..." 
 
keywords="{segment_3}"
 
replace_title

Thanks for the help. (I x’d out my API key for security purposes).

- Rob

Derek Hogue
# 4
Developer
Derek Hogue

Found it - although I state in the documentation that the “filter” parameter (to remove duplicate results) defaults to “on”, it in fact defaults to “off”. So add

filter="on" 

to your results tag, and I think you’ll find the results then match what you see in your CSE dashboard.

aiswebservices
# 5
aiswebservices

That solved it! Thank you.