# Search documents from one index by filtering with two fields data

**URL:** <https://discuss.elastic.co/t/search-documents-from-one-index-by-filtering-with-two-fields-data/20961>\
**Category:** Elasticsearch\
**Created:** [November 26, 2014, 9:22pm UTC](https://discuss.elastic.co/t/search-documents-from-one-index-by-filtering-with-two-fields-data/20961 "2014-11-26T21:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subbarao\_Kondragunta](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Subbarao\_Kondragunta](https://discuss.elastic.co/u/Subbarao_Kondragunta)\
**Post date:** [November 26, 2014, 9:22pm UTC](https://discuss.elastic.co/t/search-documents-from-one-index-by-filtering-with-two-fields-data/20961/1 "2014-11-26T21:22:37Z")

</div>

How can i search documents from one index by filtering with two fields data  
?

Ex: i want to search like username and passwords fields data from the  
index, if it matches i need to fetch all the documents of that match in  
specific index and type

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/29f32f1d-4bca-4023-825f-c1abb1a3e19c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/29f32f1d-4bca-4023-825f-c1abb1a3e19c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:47am UTC](https://discuss.elastic.co/t/search-documents-from-one-index-by-filtering-with-two-fields-data/20961/2 "2017-07-06T00:47:26Z")

</div>


