When using logstash to index data from MySQL to ElasticSearch,only the first row is being displayed

Your database record does not seem to contain a field called 'uid', which means that the string '%{uid}' is used for all records, causing the same document to be updated multiple times. Use the stdout output plugin with a ruby debug codec to see the exact structure of your event and the fields available in Logstash.