# Using queries with aliases

**URL:** <https://discuss.elastic.co/t/using-queries-with-aliases/12556>\
**Category:** Elasticsearch\
**Created:** [June 26, 2013, 8:12pm UTC](https://discuss.elastic.co/t/using-queries-with-aliases/12556 "2013-06-26T20:12:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefanie](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Stefanie](https://discuss.elastic.co/u/Stefanie)\
**Post date:** [June 26, 2013, 8:12pm UTC](https://discuss.elastic.co/t/using-queries-with-aliases/12556/1 "2013-06-26T20:12:29Z")

</div>

I would like to use an alias to create views of a subset of my data. I am  
currently using filters but the data that is outside of the filter is still  
returned in the results.

I would like the results that would be returned if I did a search within a  
query, is this possible?

Thank you,  
Stefanie

--  
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:** [June 27, 2013, 6:45am UTC](https://discuss.elastic.co/t/using-queries-with-aliases/12556/2 "2013-06-27T06:45:45Z")

</div>

Hey,

can you provide more information, or even better yet, a curl based sample,  
so we can reproduce your issue?  
I havent seen any problems with aliases and filters recently, but maybe you  
found a bug, so I'd like to reproduce it.

Thanks!

--Alex

On Wed, Jun 26, 2013 at 10:12 PM, Stefanie [stefanie@backstit.ch](mailto:stefanie@backstit.ch) wrote:

> I would like to use an alias to create views of a subset of my data. I am  
> currently using filters but the data that is outside of the filter is still  
> returned in the results.
> 
> I would like the results that would be returned if I did a search within a  
> query, is this possible?
> 
> Thank you,  
> Stefanie
> 
> --  
> 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:** ![Stefanie](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Stefanie](https://discuss.elastic.co/u/Stefanie)\
**Post date:** [June 27, 2013, 3:41pm UTC](https://discuss.elastic.co/t/using-queries-with-aliases/12556/3 "2013-06-27T15:41:04Z")

</div>

Thank you for taking the time to reply to me. While I was working on set  
up an example I figured out what I was doing to cause this to behave in a  
way I was not expecting.

Thank you,  
Stefanie

On Thursday, June 27, 2013 2:45:45 AM UTC-4, Alexander Reelsen wrote:

> Hey,
> 
> can you provide more information, or even better yet, a curl based sample,  
> so we can reproduce your issue?  
> I havent seen any problems with aliases and filters recently, but maybe  
> you found a bug, so I'd like to reproduce it.
> 
> Thanks!
> 
> --Alex
> 
> On Wed, Jun 26, 2013 at 10:12 PM, Stefanie \<stef...@backstit.ch\<javascript:\>
> 
> > wrote:
> 
> > I would like to use an alias to create views of a subset of my data. I am  
> > currently using filters but the data that is outside of the filter is still  
> > returned in the results.
> > 
> > I would like the results that would be returned if I did a search within  
> > a query, is this possible?
> > 
> > Thank you,  
> > Stefanie
> > 
> > --  
> > 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:29am UTC](https://discuss.elastic.co/t/using-queries-with-aliases/12556/4 "2017-07-06T02:29:13Z")

</div>


