rewrite indexation method (done by vincent) & fix sql condition to prevent overriding