# Duplicate query problem

**URL:** <https://discuss.elastic.co/t/duplicate-query-problem/112542>\
**Category:** Logstash\
**Created:** [December 20, 2017, 4:09am UTC](https://discuss.elastic.co/t/duplicate-query-problem/112542 "2017-12-20T04:09:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![narasiman1986](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@narasiman1986](https://discuss.elastic.co/u/narasiman1986)\
**Post date:** [December 20, 2017, 4:09am UTC](https://discuss.elastic.co/t/duplicate-query-problem/112542/1 "2017-12-20T04:09:32Z")

</div>

```
My conf file code as follows

```

for removing records i written below code as follows

```
input {

jdbc {

jdbc_driver_library => "D:\mysql-connector-java-5.1.44\mysql-connector-java-5.1.44\mysql-connector-java-5.1.44-bin.jar"

jdbc_driver_class => "com.mysql.jdbc.Driver"

 
jdbc_connection_string => "jdbc:mysql://localhost:3306/sample"

  
jdbc_user => "root"

jdbc_password => "root"

jdbc_fetch_size => 10000

    schedule => "* * * * *"
    statement => "SELECT * from sample"

#codec => "json"

  }

}

filter {
  fingerprint {
    source => "RRH_MR_NUM"
    target => "[@metadata][fingerprint]"
    method => "MURMUR3"
  }
}
output {
  elasticsearch {
    hosts => ["localhost:9200"] 
	index => "clinical" 
    document_id => "%{[@metadata][fingerprint]}"	
	}
	stdout { codec => rubydebug }
    }

```

when i see the output in kibana as follows

`mcs_crt_uid:1104448 cpa_addr_1:SECTOR - III/E rrh_mr_num:3442011 cpa_pin_code:827003 rrh_pat_sex:Male mcs_crt_dt:2015-04-11T10:40:00.000Z @timestamp:2017-12-20T04:03:30.420Z cpa_country_cd:INDIA cpa_state_cd:JHARK @version:1 rrh_regn_dt:2015-04-09T18:30:00.000Z rrh_first_name:BISHNU LAL MAHTO r rh_pat_dob:1959-04-09T18:30:00.000Z mcs_case_summary:Medical Record No. : 3442011Patient Name : MR. BISHNU LAL MAHTO Age : 56 Year(s)Sex : maleAddress : SECTOR - III/E, A. NO. - 032, BOKARO STEEL CITY, , BOKARO STEEL CITY,JHARKHAND, INDIA - 827003.Report Date : 2015-04-11 Optometrist : Start Time : Consultant : Dr.DURGA PRIYADARSHINI S_score:1`

when i click the refresh button in top right side of kibana discover record refresh in the above record but count (hits) shows 1 only.

when i click refresh button count shows one only. but when i click refresh button records changing.

what is the mistake in my above CONF file code above.

please let me know

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 20, 2017, 5:12am UTC](https://discuss.elastic.co/t/duplicate-query-problem/112542/2 "2017-12-20T05:12:08Z")

</div>

Question moved to #logstash

---

<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 17, 2018, 5:12am UTC](https://discuss.elastic.co/t/duplicate-query-problem/112542/3 "2018-01-17T05:12:11Z")

</div>

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