# NEST/.NET boost probably shouldn't be type double

**URL:** https://discuss.elastic.co/t/nest-net-boost-probably-shouldnt-be-type-double/328589
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [March 27, 2023, 8:56am UTC](https://discuss.elastic.co/t/nest-net-boost-probably-shouldnt-be-type-double/328589 "2023-03-27T08:56:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![catmanjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catmanjan/32/77810_2.png) [@catmanjan](https://discuss.elastic.co/u/catmanjan)
#### Post date: [March 27, 2023, 8:56am UTC](https://discuss.elastic.co/t/nest-net-boost-probably-shouldnt-be-type-double/328589/1 "2023-03-27T08:56:17Z")

</div>

I wanted to boost a particular field higher than others, using TermQuery the Boost parameter is of type double.

If I set the value to double.MaxValue I get a server error "boost must be a positive float, got Infinity"

Shouldn't Boost be a float then?

FYI setting the value to float.MaxValue seems to work

---

<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: [April 24, 2023, 8:56am UTC](https://discuss.elastic.co/t/nest-net-boost-probably-shouldnt-be-type-double/328589/2 "2023-04-24T08:56:28Z")

</div>

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