
com.redis.om.spring.search.stream.actions.ArrayIndexOfAction Maven / Gradle / Ivy
package com.redis.om.spring.search.stream.actions;
import java.lang.reflect.Field;
import java.util.function.ToLongFunction;
import com.redislabs.modules.rejson.Path;
public class ArrayIndexOfAction extends BaseAbstractAction implements ToLongFunction {
private Object element;
public ArrayIndexOfAction(Field field, Object element) {
super(field);
this.element = element;
}
@Override
public long applyAsLong(E value) {
return json.arrIndex(getKey(value), Path.of("." + field.getName()), element);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy