# Looking for a better searching performance --\> Search speed ( DSL Query or Lucene)

**URL:** <https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104>\
**Category:** Elasticsearch\
**Created:** [April 23, 2018, 12:58pm UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104 "2018-04-23T12:58:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lutundula\_jeanchris](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@lutundula\_jeanchris](https://discuss.elastic.co/u/lutundula_jeanchris)\
**Post date:** [April 23, 2018, 12:58pm UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/1 "2018-04-23T12:58:41Z")

</div>

Hello Guys ,

Is there a major difference between a DSL query (search) and a Lucene Query in term of performances (in while creating a visualize) . ? if yes can i get some explaination , if its possible with use case 🙂

Thanks

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 23, 2018, 1:48pm UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/2 "2018-04-23T13:48:28Z")

</div>

By "Lucene Query", do you mean the `query_string` query? Or do you mean raw Lucene implemented via java?

Given the same conditions, a `query_string` query will have the same performance as the equivalent DSL query (`match` query, etc). They are both translated to the same atomic Lucene queries and will execute identically.

---

<div class="post-metadata">

**Author:** ![lutundula\_jeanchris](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@lutundula\_jeanchris](https://discuss.elastic.co/u/lutundula_jeanchris)\
**Post date:** [April 24, 2018, 7:59am UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/3 "2018-04-24T07:59:07Z")

</div>

When i said lucene i meant , the lucene Query you do on the visualize search bar (some kind of filter with wilcard and stuff ) !

---

<div class="post-metadata">

**Author:** ![lutundula\_jeanchris](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@lutundula\_jeanchris](https://discuss.elastic.co/u/lutundula_jeanchris)\
**Post date:** [April 24, 2018, 8:01am UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/4 "2018-04-24T08:01:58Z")

</div>

Do you have any idea how can i improve my search performances (so i can get information on visualize a little bit faster , before the timeout) using DSL query .

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 24, 2018, 11:31am UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/5 "2018-04-24T11:31:03Z")

</div>

> When i said lucene i meant , the lucene Query you do on the visualize search bar (some kind of filter with wilcard and stuff ) !

Assuming it's doing the same thing as an equivalent DSL query, it'll be the same performance... they are executed identically, just a different way to specify the query.

I'm afraid performance tuning is very use-case specific. It depends on the kinds of queries you are running, cluster size, how the data is structured, etc. There aren't really general recommendations that apply to everyone (otherwise we'd just implement that as an optimization).

---

<div class="post-metadata">

**Author:** ![lutundula\_jeanchris](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@lutundula\_jeanchris](https://discuss.elastic.co/u/lutundula_jeanchris)\
**Post date:** [April 24, 2018, 11:50am UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/6 "2018-04-24T11:50:29Z")

</div>

Many 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:** [May 22, 2018, 11:50am UTC](https://discuss.elastic.co/t/looking-for-a-better-searching-performance-search-speed-dsl-query-or-lucene/129104/7 "2018-05-22T11:50:30Z")

</div>

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