block / block/elasticgraph

[Feature request] Support for multi-fields

Open
#904 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
88
Forks
36
Avg merge
5d 10h
Merged PRs (30d)
18

Description

**Scenario**

Right now you can only index 1 field into 1 OpenSearch field. I'd like to be able to index the same field into two separate OpenSearch fields for use within ElasticGraph. This unlocks the ability to create keywords for precise search as well as text fields for partial searching.

```ruby
t.field "customerName", "String" do |f|
f.mapping type: "keyword"
f.additional_mapped_field "customerNameText", type: "text" #new code
end
```

**Possible solution**

Example of what this could look like within the schema:

```ruby
t.field "customerName", "String" do |f|
f.mapping type: "keyword"
f.additional_mapped_field "customerNameText", type: "text" #new code
end
```
In this case `customerName` and `customerNameText` both get indexed as their own fields within OpenSearch that you can perform all relevant ElasticGraph operations to that type on.

**Open questions**
- Can this be added without a re-index? Assume not

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.