Skip to content

I want the whole word to be found when searching for a part of a word How to do it ??? #247

Answered by Dmit595987
Dmit595987 asked this question in Q&A
Discussion options

You must be logged in to vote

``Good afternoon!
I have no mistakes.
That's the problem.

I'm looking for the word 'mas' through the library
And I expect it to find the word 'master'

But it finds nothing

now i change explorer.php
'indexes' => [ 'courses' => [ 'model' => \App\Models\Course::class, 'properties' => [ 'name' => [ 'type' => 'string', 'analyzer' => 'ngram_analyzer', 'search_analyzer' => 'standard', ], ], ], ], 'analyzers' => [ 'ngram_analyzer' => [ 'type' => 'custom', 'tokenizer' => 'ngram_tokenizer', 'filter' => ['lowercase'], ], ], 'tokenizers' => [ 'ngram_tokenizer' => [ 'type' => 'ngram', 'min_gram' => 2, 'max_gram' => 20, ],

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Dmit595987
Comment options

Answer selected by Dmit595987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants