Build Spring AI SearchRequests with SearchRequest.builder()
ProprietarySpring AI 1.0.0-M6 removed SearchRequest.defaults(), SearchRequest.query(String) and the withX(..) methods of SearchRequest. This replaces SearchRequest.query(q).withTopK(5) with SearchRequest.builder().query(q).topK(5).build(), request.withTopK(5) with SearchRequest.from(request).topK(5).build(), and the SearchRequest.defaults() that already returned a builder in 1.0.0-M5 with SearchRequest.builder().
io. moderne. java. spring. ai1. MigrateSearchRequestmod run . --recipe= io. moderne. java. spring. ai1. MigrateSearchRequestInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.