# Scoring based on Term Position

**URL:** <https://discuss.elastic.co/t/scoring-based-on-term-position/45930>\
**Category:** Elasticsearch\
**Created:** [March 31, 2016, 12:05pm UTC](https://discuss.elastic.co/t/scoring-based-on-term-position/45930 "2016-03-31T12:05:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitkaninwal07](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@amitkaninwal07](https://discuss.elastic.co/u/amitkaninwal07)\
**Post date:** [March 31, 2016, 12:05pm UTC](https://discuss.elastic.co/t/scoring-based-on-term-position/45930/1 "2016-03-31T12:05:02Z")

</div>

Hi,

I have used autocomplete to display records matched to input .

![](https://us1.discourse-cdn.com/elastic/original/2X/c/c0f108d642346b94121ea19e27bc4ada5b5f2170.png)

it gives me the list of records which has matching words any where in the record.

But i want those records to appear first in which the position of matched words are in starting of the record.

Like i have searched Ram Nagar.

it gives me result like

OM SAI RAM, RP Nagar  
RAM Nagar, Wadla Village, RAM Nagar

i want second result to be appear before first because i searched Ram nagar term whose position in the record 2nd comes earlier than first record.

I have used EdgeNGram analyzer.

Thanks in Advance.

---

<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, 2017, 11:03pm UTC](https://discuss.elastic.co/t/scoring-based-on-term-position/45930/2 "2017-07-05T23:03:33Z")

</div>


