Skip to content

Support like query #37

Open
Open
@asoqa

Description

@asoqa

es support wildcard query, something like this:

    private function buildLikeCondition($operator, $operands)
    {
        if (!isset($operands[0], $operands[1])) {
            throw new InvalidParamException("Operator '$operator' requires two operands.");
        }

        if( $operator == 'like') {
            $like_text = "*" . $operands[1] . "*";
            $query = ['wildcard' => [$operands[0]=>$like_text]];
        }
        return $query;
//         throw new NotSupportedException('like conditions are not supported by elasticsearch.');
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions