save userId as field in index