public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, NamedQueries namedQueries) {
SolrQueryMethod queryMethod = new SolrQueryMethod(method, metadata, entityInformationCreator);
String namedQueryName = queryMethod.getNamedQueryName();
SolrOperations solrOperations = selectSolrOperations(metadata);
if (namedQueries.hasQuery(namedQueryName)) {
String namedQuery = namedQueries.getQuery(namedQueryName);
return new StringBasedSolrQuery(namedQuery, queryMethod, solrOperations);
} else if (queryMethod.hasAnnotatedQuery()) {