static IndexData getAvailableIndexIfAny(CompiledValue cv, ExecutionContext context, int operator)
      throws TypeMismatchException, NameResolutionException {
    // If operator is = or != then first search for PRIMARY_KEY Index
    boolean usePrimaryIndex =
        operator == OQLLexerTokenTypes.TOK_EQ || operator == OQLLexerTokenTypes.TOK_NE;
    return getAvailableIndexIfAny(cv, context, usePrimaryIndex);
  }
Gets an Index available for the condition

@param cv Condition on which index needs to be obtained
@param context ExecutionContext object
@param operator int argument identifying the type of operator
@return IndexData object
geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java