I'm using a google custom search engine on my website.
I have two refinements on this custom search
Refinement 1: searches on my blog Refinement 2: searches on a blog of my friend
but I need a third refinement which searches for newest results of both websites, or the results of last 24 hours.
Can I add some operator to the refinement which can do this?
Or is there some other way to achieve it?
There are two ways to create a refinement that searches both sites.
In the new refinement dialog, select the "Search only select sites" radio button. Then, make sure you assign this new label to your website and your friend's blog (Control Panel > Sites ...).
You could also perform the same filter by using the or
operator to include both sites with the new label. In the last text field enter: site:yourURL.com OR site:friendsURL.com
. This will cause any search to be performed on only those two sites.
Both methods were tested and work correctly.
Also, you can search posts in the last 24 hours. However, it's not immediatly clear how to integrate this into custom search since this can only be use via the query URL.
5.1.3. tbs=qdr: Limit Results by Time Period
With Google's release of Search options you can now limit your search results by time period. The format is as follows:
&tbs=rltm:1 [real time results] &tbs=qdr:s [past second] &tbs=qdr:n [past minute] &tbs=qdr:h [past hour] &tbs=qdr:d [past 24 hours (day)] &tbs=qdr:w [past week] &tbs=qdr:m [past month] &tbs=qdr:y [past year]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With