Reputation: 2841
as the title says, how do I set this from within my spring data elasticsearch applciaiton (spring boot)?
I can see in the exception traces that it is set to 10000. I need slightly more.
Upvotes: 1
Views: 2627
Reputation: 219
Simply an entry in your application.properties:
spring.data.elasticsearch.properties.index.max_result_window=15000
Upvotes: 2
Reputation: 383
If you want to increase the max_result_window, you should set this property when creating your index. Using spring boot, you can have something like this (Example for max_result_window = 15000:
@SpringBootApplication
public class MainClass implements CommandLineRunner {
@Autowired
public ElasticsearchTemplate elasticsearchTemplate;
public static void main(String[] args) {
SpringApplication.run(MainClass.class).close()
}
@Override
public void run(String... args) throws Exception {
elasticsearchTemplate.createIndex(Entity.class, "max_result_window = 15000");
}
Upvotes: 1