Stool softening food

What is good stool softening food when dealing with hurtful anal fissure? I read about eating soluble fiber, is this correct? It read it is advised to eat vegetables and legumes. Can you help me with what is best to eat? At the moment i eat lentils and legumes in general and stool is bigger and I'm not sure if this is optimal, but idk.