decaporg / decaporg/decap-cms

Add customization of collection search

Open
#549 4 comments 4 reactions 0 assignees View on GitHub
area: search kind: feature pinned
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**- Do you want to request a *feature* or report a *bug*?**

Feature

**- What is the current behavior?**

When viewing a collection, the search function seems to only search a single field named "title".

**- What is the expected behavior?**

Configuration should exist allowing one to set which fields should be included in collection search, very much like a "relation" field widget. Something like:

```yaml
collections:
- name: releases
label: Releases
folder: "content/releases"
create: true
searchFields: ["product", "channel", "version"]
```

Alternately, allow for dynamic creation of `title` field in absence of one in the model (very much like `slug`) to be used for display and search:

```yaml
collections:
- name: releases
label: Releases
folder: "content/releases"
create: true
title: "{product} {channel} {version}"
```

**- Please mention your node.js, and operating system version.**

This is just in the web interface for the CMS admin.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.