The feature selection effect directly affects the classification accuracy of the text. This paper introduces a new text feature selection method based on bat optimization. This method uses the traditional feature selection method to pre-select the original features, and then uses the bat group algorithm to optimize the pre-selected features in binary code form, and uses the classification accuracy as the individual fitness. However, when the amount of text information is large, the execution time of the single machine is long. According to this shortcoming, combining the Bat Algorithm and the Spark parallel computing framework, the text feature selection algorithm SBATFS is proposed. The algorithm combines the good search performance of the bat algorithm with the distributed and efficient calculation speed to realize the efficient solution of the text feature selection optimization model. The results show that compared with the traditional feature selection method, after SBATFS is used for feature optimization, the classification accuracy is effectively improved.