# How to add more Attributes to the Completion Suggester

**URL:** <https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330>\
**Category:** Elasticsearch\
**Created:** [May 29, 2019, 12:27pm UTC](https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330 "2019-05-29T12:27:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogito\_manda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogito_manda/32/45300_2.png) [@rogito\_manda](https://discuss.elastic.co/u/rogito_manda)\
**Post date:** [May 29, 2019, 12:27pm UTC](https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330/1 "2019-05-29T12:27:01Z")

</div>

I want to build an Autocomplete from a query datasets.  
This Dataset contains some attributes like:  
Session ID, Query, Timestamp and more..

So i´ve build an Autocomplete feature with the "Completion Suggester" first, where i can sort the queries for Popularity, where my "weight" attribute is the occurrence of the query in the whole dataset.

The problem is that now i want build a more complex "re-ranker", where i sort the results not just for popularity, but also for "recency".  
For that i need to store all the Queries not only with a "weight" parameter, but also with the timestamps of the queries.

I read in the documentation that only 2 parameters are allowed: Input and Weight.. It´s not possible to store the Timestamps?

How can i achive my goal in the best way?

---

<div class="post-metadata">

**Author:** ![rogito\_manda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogito_manda/32/45300_2.png) [@rogito\_manda](https://discuss.elastic.co/u/rogito_manda)\
**Post date:** [May 30, 2019, 1:42pm UTC](https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330/2 "2019-05-30T13:42:53Z")

</div>

anyone know how can i do?

---

<div class="post-metadata">

**Author:** ![rogito\_manda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogito_manda/32/45300_2.png) [@rogito\_manda](https://discuss.elastic.co/u/rogito_manda)\
**Post date:** [June 7, 2019, 2:03pm UTC](https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330/3 "2019-06-07T14:03:42Z")

</div>

anyone???

---

<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:** [July 5, 2019, 2:03pm UTC](https://discuss.elastic.co/t/how-to-add-more-attributes-to-the-completion-suggester/183330/4 "2019-07-05T14:03:45Z")

</div>

Closed on July 5, 2019, 2:03pm UTC

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