Skip to content

Commit

Permalink
Include indicator ID in searched terms. (#1528)
Browse files Browse the repository at this point in the history
<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #1525
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [x] CHANGES.rst has been updated (with summary of main changes)
- [x] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?

* In the RtD, indicator search now searches through the indicator IDs. 

### Does this PR introduce a breaking change?


### Other information:
  • Loading branch information
huard authored Nov 29, 2023
2 parents d382912 + b1c0e42 commit 209ee32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog

v0.47.0 (unreleased)
--------------------
Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`).
Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`), David Huard (:user:`huard`).

Announcements
^^^^^^^^^^^^^
Expand All @@ -14,6 +14,7 @@ Announcements
New features and enhancements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* New functions ``xclim.ensembles.robustness_fractions`` and ``xclim.ensembles.robustness_categories``. The former will replace ``xclim.ensembles.change_significance`` which is now deprecated and will be removed in xclim 0.49 (:pull:`1514`).
* Add indicator ID to searched terms in the indicator search documentation page (:issue:`1525`, :pull:`1528`).

Bug fixes
^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/indsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let indicators = [];

/* MiniSearch object defining search mechanism */
let miniSearch = new MiniSearch({
fields: ['title', 'abstract', 'variables', 'keywords'], // fields to index for full-text search
fields: ['title', 'abstract', 'variables', 'keywords', 'id'], // fields to index for full-text search
storeFields: ['title', 'abstract', 'vars', 'realm', 'module', 'name', 'keywords'], // fields to return with search results
searchOptions: {
boost: {'title': 3, 'variables': 2},
Expand Down

0 comments on commit 209ee32

Please sign in to comment.