decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.91k stars 3.04k forks source link

Add customization of collection search #549

Open pmac opened 7 years ago

pmac commented 7 years ago

- 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:

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:

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.

erquhart commented 7 years ago

This would be a nice improvement, agreed.

manuelJung commented 5 years ago

any updates on this?

mushkin-v commented 4 years ago

any updates on this?

erezrokah commented 4 years ago

Best way to push this forward is to upvote the issue as we use it for prioritization. Regardless if you set a summary on a collection using a field, the CMS should use it when searching.