# Build quick and detailed search via elasticsearch

**URL:** <https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681>\
**Category:** Elasticsearch\
**Created:** [February 27, 2017, 6:45pm UTC](https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681 "2017-02-27T18:45:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaziemo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaziemo/32/15890_2.png) [@zaziemo](https://discuss.elastic.co/u/zaziemo)\
**Post date:** [February 27, 2017, 6:45pm UTC](https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681/1 "2017-02-27T18:45:29Z")

</div>

## Context

Currently we at [speakerinnen.org](http://speakerinnen.org) are using a homegrown postgres search for searching all the profiles and topics. There are two types of search:

- a quick search (which only searches some fields - fullname, topics, twitter handle) and
- a detailed search (which searches mostly all fields and makes it possible to search specific content in specific fields).  
See the search working here: [https://speakerinnen.org/en/profiles](https://speakerinnen.org/en/profiles)

Now I want to use elasticsearch to rebuild the search and I already implemented the basic functions of elasticsearch via the elasticsearch-rails gem in this branch: [https://github.com/rubymonsters/speakerinnen\_liste/tree/zaziemo-elasticsearch](https://github.com/rubymonsters/speakerinnen_liste/tree/zaziemo-elasticsearch)

## My questions:

What is the best way to build these two search options with elasticsearch? Specificly:

- How to decide on the best approach to realize the two search options via elasticsearch (e.g. create multiple indeces, use different index types)?
- Are there examples of similar approaches?

---

<div class="post-metadata">

**Author:** ![Babadofar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babadofar/32/44803_2.png) [@Babadofar](https://discuss.elastic.co/u/Babadofar)\
**Post date:** [February 27, 2017, 7:08pm UTC](https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681/2 "2017-02-27T19:08:01Z")

</div>

Hi,  
This is a very common setup. Are you sure you really want to add a separate section for advanced search? You could combine most of your requirements into one search box, simply by adding all the fields you want to be searchable, for instance using the [multi-match query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html). Perhaps with the exception of language and country. These can be added as filters using a [bool query.](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html)  
Even if you should decide you want to go for a full blown advanced search where users have to hit the correct input box for each part, you still only need one index, and most likely just one type as well. Good luck!

---

<div class="post-metadata">

**Author:** ![zaziemo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaziemo/32/15890_2.png) [@zaziemo](https://discuss.elastic.co/u/zaziemo)\
**Post date:** [March 6, 2017, 7:16pm UTC](https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681/3 "2017-03-06T19:16:14Z")

</div>

thank you for sharing your thoughts!

---

<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 3, 2017, 7:16pm UTC](https://discuss.elastic.co/t/build-quick-and-detailed-search-via-elasticsearch/76681/4 "2017-04-03T19:16:37Z")

</div>

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