# Complex search terms

**URL:** <https://discuss.elastic.co/t/complex-search-terms/13684>\
**Category:** Elasticsearch\
**Created:** [September 19, 2013, 3:51am UTC](https://discuss.elastic.co/t/complex-search-terms/13684 "2013-09-19T03:51:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nora\_Olsen](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@Nora\_Olsen](https://discuss.elastic.co/u/Nora_Olsen)\
**Post date:** [September 19, 2013, 3:51am UTC](https://discuss.elastic.co/t/complex-search-terms/13684/1 "2013-09-19T03:51:48Z")

</div>

Hi,

I'm very new to Elastic Search or search indexes in general.

We are using haystack and have the search index mapped to our model with

- text (title + description)
- country name
- city name
- array of tags

I can see that in the index, \_source is properly populated.

With this, I can perform a search on the text easily that is provided for  
by ES.

But what techniques can I use this perform searches such as this  
"concerts in UK"  
"hiking in brazil"

or even with tags  
"museums in new york" , where museums=tag and new york=city

How do people power their search bar to perform more complex searches?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 19, 2013, 7:22am UTC](https://discuss.elastic.co/t/complex-search-terms/13684/2 "2013-09-19T07:22:57Z")

</div>

Hey,

as there is no named entity recognition built into elasticsearch (which  
detects and extracts museum as a location for tagging and new york as a  
city), you have to options:

- Execute this named entity extraction in your application (quite some work)
- Use the all field for this kind of queries. See all field contains the  
concatenated content of all your other fields, and will therefore match, if  
you search for 'museum in new york'. For more information about the all  
field, see [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/all-field/)

If both doesnt match your requirements, feel free add some more infos and  
I'll try to think harder.

--Alex

On Thu, Sep 19, 2013 at 5:51 AM, Nora Olsen [nora.olsen77@gmail.com](mailto:nora.olsen77@gmail.com) wrote:

> Hi,
> 
> I'm very new to Elastic Search or search indexes in general.
> 
> We are using haystack and have the search index mapped to our model with
> 
> - text (title + description)
> - country name
> - city name
> - array of tags
> 
> I can see that in the index, \_source is properly populated.
> 
> With this, I can perform a search on the text easily that is provided for  
> by ES.
> 
> But what techniques can I use this perform searches such as this  
> "concerts in UK"  
> "hiking in brazil"
> 
> or even with tags  
> "museums in new york" , where museums=tag and new york=city
> 
> How do people power their search bar to perform more complex searches?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Nora\_Olsen](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@Nora\_Olsen](https://discuss.elastic.co/u/Nora_Olsen)\
**Post date:** [September 19, 2013, 7:46am UTC](https://discuss.elastic.co/t/complex-search-terms/13684/3 "2013-09-19T07:46:00Z")

</div>

Thanks. I did think about using NLP as a pre processor.

Would I be using boost to improve the score if the "museum" is a match in  
the list of tags and/or "New York" in the city field, instead of some text  
that has both words in the article description. I'm trying to improve the  
scores of articles that have a direct match for either the tags or  
location.

On Thursday, September 19, 2013 3:22:57 PM UTC+8, Alexander Reelsen wrote:

> Hey,
> 
> as there is no named entity recognition built into elasticsearch (which  
> detects and extracts museum as a location for tagging and new york as a  
> city), you have to options:
> 
> - Execute this named entity extraction in your application (quite some  
> work)
> - Use the all field for this kind of queries. See all field contains the  
> concatenated content of all your other fields, and will therefore match, if  
> you search for 'museum in new york'. For more information about the all  
> field, see [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/all-field/)
> 
> If both doesnt match your requirements, feel free add some more infos and  
> I'll try to think harder.
> 
> --Alex
> 
> On Thu, Sep 19, 2013 at 5:51 AM, Nora Olsen \<[nora.o...@gmail.com](mailto:nora.o...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi,
> > 
> > I'm very new to Elastic Search or search indexes in general.
> > 
> > We are using haystack and have the search index mapped to our model with
> > 
> > - text (title + description)
> > - country name
> > - city name
> > - array of tags
> > 
> > I can see that in the index, \_source is properly populated.
> > 
> > With this, I can perform a search on the text easily that is provided for  
> > by ES.
> > 
> > But what techniques can I use this perform searches such as this  
> > "concerts in UK"  
> > "hiking in brazil"
> > 
> > or even with tags  
> > "museums in new york" , where museums=tag and new york=city
> > 
> > How do people power their search bar to perform more complex searches?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:15am UTC](https://discuss.elastic.co/t/complex-search-terms/13684/4 "2017-07-06T02:15:35Z")

</div>


