# Based the document score on a unique field

**URL:** <https://discuss.elastic.co/t/based-the-document-score-on-a-unique-field/4186>\
**Category:** Elasticsearch\
**Created:** [April 4, 2011, 1:35pm UTC](https://discuss.elastic.co/t/based-the-document-score-on-a-unique-field/4186 "2011-04-04T13:35:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tdudouet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tdudouet/32/3243_2.png) [@tdudouet](https://discuss.elastic.co/u/tdudouet)\
**Post date:** [April 4, 2011, 1:35pm UTC](https://discuss.elastic.co/t/based-the-document-score-on-a-unique-field/4186/1 "2011-04-04T13:35:57Z")

</div>

Hi all,

I try to make a search query based on a unique field, nevertheless,  
the document score seems to be attached on the other fields content  
too.

final FieldQueryBuilder qBuilder =  
QueryBuilders.fieldQuery("searchable", "my query");  
qBuilder.defaultOperator(Operator.AND);

For example, the code above is supposed to search into the unique  
field named "searchable", but the score depends on other fields  
too...

I thought about map the non relevant fields (for search) as not  
indexed, but they are used for facetting...

Am I wrong in my practices ?

Thanks for responses... and nice work about ES !

Thomas

---

<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 6, 2017, 4:08am UTC](https://discuss.elastic.co/t/based-the-document-score-on-a-unique-field/4186/2 "2017-07-06T04:08:55Z")

</div>


