Searching in pro edition

Is it possible to change way of searching by matching only for exact words?

let’s say I have files,
If I type seven in results both files would show up. I want only to show
So in summary i want to change display results to show only exact matching words.

Is it possible right now?
Are there any chances to add this one day in something like “advanced search”?

1 Like

@shoeper we found the way to search only matching exact words
open file //opt/seafile/seafile-pro-server-8.0.0/pro/python/seafes/indexes/

edit line 349 (in func search_in_file__name_ngram)
“minimum_should_match”: “100%”,

delete in this directory pycache and restart seafile and seahub


Thanks! Default seems to be 80%.

Also lots of depends on tokenizer, in our case it was important to adjust searching for files like
AB-12-34-56_07 so I changed
‘tokenizer’: {
‘seafile_file_name_ngram_tokenizer’: {
‘type’: ‘ngram’,
‘min_gram’: ‘3’,
‘max_gram’: ‘4’
#‘token_chars’: [‘letter’,‘digit’]
so all token chars are accepted for “grams” in n-gram tokenizer