A computer-implemented sample set classification and index table establishment method for analyzing and processing the sample set in advance of receiving search queries, comprising: determining N clusters and corresponding N cluster centers by clustering feature vectors of a plurality of samples in a sample set; recording, in a first vector table, cluster identifiers of the N clusters and N center vectors corresponding to the N cluster centers; dividing a feature vector of each of the plurality of samples into M segments based on dimensions of the feature vector to form a segment vector corresponding to each segment i; determining k segment clusters corresponding to each segment i and corresponding k segment cluster centers by clustering segment vectors of the plurality of samples in each segment, respectively; recording, in a second vector table, cluster identifiers of the k segment clusters corresponding to each segment i and a segment center vector corresponding to each segment cluster center; obtaining a feature vector V of a sample in the sample set; determining a center vector that is closest to the feature vector V among the N center vectors recorded in the first vector table, and using a cluster identifier corresponding to the closest center vector as first index data; dividing the feature vector V into M segments based on dimensions of the feature vector V to form a segment vector Vi corresponding to each segment i; determining a segment center vector closest to a corresponding segment vector Vi among the k segment center vectors corresponding to each segment i that are recorded in the second vector table, and using a cluster identifier of a segment cluster corresponding to the determined segment center vector as second index data; and adding the first index data and the second index data, respectively, to a first index field and a second index field of an index table. determining N clusters and corresponding N cluster centers by clustering feature vectors of a plurality of samples in a sample set; recording, in a first vector table, cluster identifiers of the N clusters and N center vectors corresponding to the N cluster centers; dividing a feature vector of each of the plurality of samples into M segments based on dimensions of the feature vector to form a segment vector corresponding to each segment i; determining k segment clusters corresponding to each segment i and corresponding k segment cluster centers by clustering segment vectors of the plurality of samples in each segment, respectively; recording, in a second vector table, cluster identifiers of the k segment clusters corresponding to each segment i and a segment center vector corresponding to each segment cluster center; obtaining a feature vector V of a sample in the sample set; determining a center vector that is closest to the feature vector V among the N center vectors recorded in the first vector table, and using a cluster identifier corresponding to the closest center vector as first index data; dividing the feature vector V into M segments based on dimensions of the feature vector V to form a segment vector Vi corresponding to each segment i; determining a segment center vector closest to a corresponding segment vector Vi among the k segment center vectors corresponding to each segment i that are recorded in the second vector table, and using a cluster identifier of a segment cluster corresponding to the determined segment center vector as second index data; and adding the first index data and the second index data, respectively, to a first index field and a second index field of an index table.