Elasticsearch search for a part of a word

There is a field article has the meaning 79950v01 xx25
when i search 79950v01 or xx25 or 79950v01 xx25 everything is working.
but
when i search 9950v01 or 9950v0 or x25 not working.
my code

        $body = [
            'query' => [
                'multi_match' => [
                    'query' => $query,
                    'fields' => ['article'],
                ],
            ],
            'size' => 99
        ];

        $items = $this->elasticsearch->search([
            'index' => $model->getSearchIndex(),
            'type' => $model->getSearchType(),
            'body' => $body
        ]);

what should be the correct query to search for a part of the word?
for example: sss79950v01 or dfdxx25 or 79950v01 xx25dfdf Thanks!


Ответы (0 шт):