PHPackages                             unocha/ocha\_search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. unocha/ocha\_search

ActiveDrupal-module[Search &amp; Filtering](/categories/search)

unocha/ocha\_search
===================

v1.1.1(1y ago)010.6kGPL-2.0-onlyPHP

Since Nov 30Pushed 1y ago4 watchersCompare

[ Source](https://github.com/UN-OCHA/ocha_search)[ Packagist](https://packagist.org/packages/unocha/ocha_search)[ RSS](/packages/unocha-ocha-search/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

OCHA search module
==================

[](#ocha-search-module)

This module provides basic configuration and one or two search results pages for results from Google Custom Search Engine searches:

- one, to be configured, for the site the module is installed on,
- the other, optional, for OCHA-wide results.

Google Indexing
---------------

[](#google-indexing)

To use GCSE effectively as an in-site search, the site’s content needs to be indexed by Google. We use Drupal xmlsitemap module to provide a sitemap and we can submit that to Google for indexing. This requires access to Google Search console which can be requested via

Additional setup in the subtheme
--------------------------------

[](#additional-setup-in-the-subtheme)

The result page template can be overridden in the subtheme, and the styling can be extended by a subtheme library.

`common_design_subtheme.info.yml`

```
libraries-extend:
  ocha_search/google-cse:
    - common_design_subtheme/google-cse
```

This module also provides a Drupal block for the search form. Place this block in the Header Search region. The markup of the search form currently relies on the [Common Design](https://github.com/UN-OCHA/common_design) base theme for styles and javascript.

Configuration
-------------

[](#configuration)

There are two sets of configurations required: 'Google config', on the Google site at 'Internal config', on the OCHA site at /admin/config/search/gcse-config

Site search results will appear at `/results` unless set to another path in the 'internal config'. This is to avoid conflict with `/search` as that path may already be defined by other modules.

OCHA-wide search results will by default appear at `/ocha-wide-results`. They can be turned off via the 'Enable tab for OCHA-wide results' checkbox, and the path can be configured. Both options are on the internal config page.

Site search requires a GCSE ID, which comes from the Google config page. That ID must be added on the internal config page.

### Google config

[](#google-config)

The 'standard' configuration options are included in `example-context-cse.xml`in the `gcse_config` directory. The file can be uploaded to a custom search engine via the advanced tab in the setup. The name and description should be edited accordingly.

All the color preferences and other styling choices are included in a css file in the module, so configuration of those in the google interface can be ignored.

### Internal config

[](#internal-config)

Site search:

- The path for the results page for site-only search, if a different path than '/results'.
- A descriptive text for the site search results page.
- The GCSE ID for the current site search, found on the Google config page. OCHA-wide search:
- A checkbox to Enable OCHA-wide results - if unchecked, only the site search will be shown.
- The path for the results page for OCHA-wide search, if a different path than '/ocha-wide-results'.
- A descriptive text for the OCHA-wide search results pages.
- The GCSE ID for the OCHA-wide search. Leave this as the default value for consistency with other sites.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~183 days

Total

11

Last Release

544d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/346443feed98de86efcea04bbc5094dc2a4146181bca1e8936beb6ac46eed455?d=identicon)[unocha](/maintainers/unocha)

---

Top Contributors

[![lazysoundsystem](https://avatars.githubusercontent.com/u/67453?v=4)](https://github.com/lazysoundsystem "lazysoundsystem (20 commits)")[![left23](https://avatars.githubusercontent.com/u/1835923?v=4)](https://github.com/left23 "left23 (20 commits)")[![attiks](https://avatars.githubusercontent.com/u/105144?v=4)](https://github.com/attiks "attiks (3 commits)")

### Embed Badge

![Health badge](/badges/unocha-ocha-search/health.svg)

```
[![Health](https://phpackages.com/badges/unocha-ocha-search/health.svg)](https://phpackages.com/packages/unocha-ocha-search)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.6k10](/packages/helsingborg-stad-municipio)[10up/elasticpress

Supercharge WordPress with Elasticsearch.

1.3k405.5k20](/packages/10up-elasticpress)[october/rain

October Rain Library

1601.7M100](/packages/october-rain)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k17.3k99](/packages/elgg-elgg)[mediawiki/maps

Adds various mapping features to MediaWiki

85155.1k3](/packages/mediawiki-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
