Hi. Using hibernate search 6.1.8 and calling JpaRepository, repository.saveAll(list) where the list contains >20k records i notice that saveAll has too bad performance because it updates the indexes of my object as well.
Is there any way to improve the performance somehow ?
@Getter
@Setter
@RequiredArgsConstructor
@Entity
@Indexed(index = "idx_object")
@DynamicUpdate
@Table(name = "object")
public class Object extends BaseEntity {
...
}
But… indexing of 20k records will have to happen somewhere at some point, be it right away, later or in chunks. Hence, I’d suggest looking into how to reduce the number of entities updated/created, and if it really has to be 20k at a time … then the expectations just have to be adjusted it’s going to take time …