# Specifying many fields in query string query vs. using the \_all field

**URL:** <https://discuss.elastic.co/t/specifying-many-fields-in-query-string-query-vs-using-the-all-field/107283>\
**Category:** Elasticsearch\
**Created:** [November 11, 2017, 8:31pm UTC](https://discuss.elastic.co/t/specifying-many-fields-in-query-string-query-vs-using-the-all-field/107283 "2017-11-11T20:31:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kabcampbell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kabcampbell/32/137695_2.png) [@kabcampbell](https://discuss.elastic.co/u/kabcampbell)\
**Post date:** [November 11, 2017, 8:31pm UTC](https://discuss.elastic.co/t/specifying-many-fields-in-query-string-query-vs-using-the-all-field/107283/1 "2017-11-11T20:31:01Z")

</div>

I'm trying to figure out the best way to search using a query string query where each document in my index has several hundred fields/properties. For, for example, let's say this is a document:

```
{
	"employeeID": 123,
	"firstName": "John",
	"lastName": "Smith",
	"anotherField1": "value" ...
	...
	"anotherField200": "value"
}

```

Is there a performance disadvantage to specifying, say, 200 fields in my query, like:

```
GET /_search
{
	"query": {
		"query_string" : {
			"fields" : ["firstName", "lastName", "anotherField1"... "anotherField200"],
			"query" : "this AND that"
		}
	}
}

```

vs.

```
GET /_search
{
	"query": {
		"query_string" : {
			"query" : "this AND that"
		}
	}
}

```

which would query the `_all` field?

I would think so, but I haven't been able to find anything specifically saying this, or information about how many fields in a multi-field query is too many. I don't like the idea of using the `_all` field for several reasons - I would prefer to implement query-time boosting, and I'd like to apply different analyzers to some fields, to name a couple of reasons.

---

<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:** [December 9, 2017, 8:31pm UTC](https://discuss.elastic.co/t/specifying-many-fields-in-query-string-query-vs-using-the-all-field/107283/2 "2017-12-09T20:31:26Z")

</div>

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