# Fully custom sparse search

**URL:** <https://discuss.elastic.co/t/fully-custom-sparse-search/353070>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [February 12, 2024, 12:57pm UTC](https://discuss.elastic.co/t/fully-custom-sparse-search/353070 "2024-02-12T12:57:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mwon/32/123208_2.png) [@mwon](https://discuss.elastic.co/u/mwon)\
**Post date:** [February 12, 2024, 12:57pm UTC](https://discuss.elastic.co/t/fully-custom-sparse-search/353070/1 "2024-02-12T12:57:27Z")

</div>

Hi!  
I want to try to create an index, where for each document it will index directly the document's tokens and respective score. Then, at query time, I want to multiply each query token score with the correspond token in every document, followed by a sort.  
So, in resume, I just want to write a custom inverted index like BM25, but where I will feed the tokens, the respective scores and the ranking function.  
Is this doable with elasticsearch?  
Thanks

---

<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:** [March 11, 2024, 12:58pm UTC](https://discuss.elastic.co/t/fully-custom-sparse-search/353070/2 "2024-03-11T12:58:21Z")

</div>

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