# How to use an array as a param for feature logging (Elasticsearch learning to rank plugin)

**URL:** <https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112>\
**Category:** Elasticsearch\
**Created:** [May 16, 2021, 6:04pm UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112 "2021-05-16T18:04:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndkmath1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndkmath1/32/86601_2.png) [@ndkmath1](https://discuss.elastic.co/u/ndkmath1)\
**Post date:** [May 16, 2021, 6:04pm UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/1 "2021-05-16T18:04:47Z")

</div>

I want to create a feature in my featureset and its param is an array. I known how to use a single value for feature logging but I don't know how to use an array. I tried something like below but it didn't help. Do you have any solutions for that?

```auto
PUT _ltr/_featureset/test
{
    "featureset": {
        "features": [
            {
                "name": "matched_author",
                "params": [
                    "authors"
                ],
                "template_language": "mustache",
                "template": {
                    "terms": "{{#toJson}}{{authors}}{{/toJson}}"
                }
            }
        ]
    },
    "validation": {
        "params": {
            "authors": {
                "id": [1, 2]
            }
        },
        "index": "my_index"
    }
}

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 17, 2021, 12:20am UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/2 "2021-05-17T00:20:58Z")

</div>

That's not an Elasticsearch endpoint.  
Are you using the aws service?

---

<div class="post-metadata">

**Author:** ![ndkmath1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndkmath1/32/86601_2.png) [@ndkmath1](https://discuss.elastic.co/u/ndkmath1)\
**Post date:** [May 17, 2021, 3:22am UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/3 "2021-05-17T03:22:52Z")

</div>

Thank warkolm for your quick response.  
I'm not using AWS. I'm using my own cluster.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 17, 2021, 6:09am UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/4 "2021-05-17T06:09:20Z")

</div>

That is not a native Elasticsearch API endpoint, and it's not something that we produce at this point, so I am not sure it's anything we can help with sorry. You may need to contact the developers of it.

---

<div class="post-metadata">

**Author:** ![ndkmath1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ndkmath1/32/86601_2.png) [@ndkmath1](https://discuss.elastic.co/u/ndkmath1)\
**Post date:** [May 17, 2021, 6:41am UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/5 "2021-05-17T06:41:02Z")

</div>

Yeah, got it. I will contact the developers of that plugin.  
Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 14, 2021, 6:41am UTC](https://discuss.elastic.co/t/how-to-use-an-array-as-a-param-for-feature-logging-elasticsearch-learning-to-rank-plugin/273112/6 "2021-06-14T06:41:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
