Page tree
Skip to end of metadata
Go to start of metadata

Yves Van Grimberge - yves.vangrimberge@engie.com

Fabian Schneider - fabian.schneider@lemonize.de

Cedric Reichenbach - cedric.reichenbach@magnolia-cms.com

-----------------

As part of the Hackathon 2018 we experimented with the new find bar and were searching ways on how to extend it.

We implemented 2 additional RestSearchResultSupplierDefinition

  • Wikipedia Search - Using Wikipedia API
  • Google Search - Using SerpAPI (using demo account)

Files can be found on https://github.com/yvesvangrimberge/MagnoliaFindBarRestSearchProviders

to activate this you need to add those resource files under 

/periscope-core/searchResultSuppliers/

Afterwards Reload the Magnolia Author frontend using 

/magnoliaAuthor/.magnolia/admincentral?restartApplication


Wikipedia Search

Wikipedia Search
baseUrl: https://nl.wikipedia.org/w/api.php
requestParameters: ?format=json&action=query&titles=${query}&redirects
navigationBaseURL: "https://nl.wikipedia.org/?curid=%s"
titleJsonPath: $..title
navigationURLJsonPath: $..pageid
class: info.magnolia.periscope.search.rest.RestSearchResultSupplierDefinition


Google Search - Using SerpAPI

API not provided by Google but another external company which uses scraping of Google Search Results Page

working with demo license ... apparently paying account is needed for higher volume usage

Google Search - SerpAPI
baseUrl: https://serpapi.com/search
requestParameters: ?q=${query}&google_domain=google.be
navigationBaseURL: "%s"
titleJsonPath: $.organic_results[*].title
navigationURLJsonPath: $.organic_results[*].link
class: info.magnolia.periscope.search.rest.RestSearchResultSupplierDefinition
  • No labels