# How to filter the results based on protocol

**URL:** https://discuss.elastic.co/t/how-to-filter-the-results-based-on-protocol/160060
**Category:** Elasticsearch
**Created:** [December 9, 2018, 6:03pm UTC](https://discuss.elastic.co/t/how-to-filter-the-results-based-on-protocol/160060 "2018-12-09T18:03:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anveshdd](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anveshdd](https://discuss.elastic.co/u/anveshdd)
#### Post date: [December 9, 2018, 6:03pm UTC](https://discuss.elastic.co/t/how-to-filter-the-results-based-on-protocol/160060/1 "2018-12-09T18:03:07Z")

</div>

Working on ES 6.4.2. How can I filter the below results.

`Title: Some TITLE  
Description:A Storm application is designed as a "topology" in the shape of a directed acyclic graph (DAG) with spouts and bolts acting as the graph vertices. Edges on the graph are named streams and direct data from one node to another. Together, the topology acts as a data transformation pipeline. At a superficial level the general topology structure is similar to a MapReduce job, with the main difference being that data is processed in real time as opposed to in individual batches. Additionally, Storm topologies run indefinitely until killed, while a MapReduce job DAG must eventually end.  
url: [https://www.someurl.com](https://www.someurl.com)

Title: Some TITLE  
Description:A Storm application is designed as a "topology" in the shape of a directed acyclic graph (DAG) with spouts and bolts acting as the graph vertices. Edges on the graph are named streams and direct data from one node to another. Together, the topology acts as a data transformation pipeline. At a superficial level the general topology structure is similar to a MapReduce job, with the main difference being that data is processed in real time as opposed to in individual batches. Additionally, Storm topologies run indefinitely until killed, while a MapReduce job DAG must eventually end.  
url: [http://www.someurl.com`](http://www.someurl.com%60)

How can I get either one of the record. Title and content is same url and the only one is need to filter http and https. Any Solution.

---

<div class="post-metadata">

### Author: ![SaskiaVola](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@SaskiaVola](https://discuss.elastic.co/u/SaskiaVola)
#### Post date: [December 10, 2018, 9:17am UTC](https://discuss.elastic.co/t/how-to-filter-the-results-based-on-protocol/160060/2 "2018-12-10T09:17:44Z")

</div>

Hi Anvesh,

did you write a custom mapping for your index or are you using the default mappings?

If you're using the default-mapping or the standard analyzer for the URL-field, the protocols will be tokenized as "https" and "http". So you can simply use a ["match"-Query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html) to filter based on the protocol.

Kind regards,  
Saskia

---

<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: [January 7, 2019, 9:17am UTC](https://discuss.elastic.co/t/how-to-filter-the-results-based-on-protocol/160060/3 "2019-01-07T09:17:49Z")

</div>

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