- Posts: 53
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Search Tool can't search number from Drop-down Selection.
Search Tool can't search number from Drop-down Selection.
- saovry
- Topic Author
- Offline
- Senior Member
Less
More
3 years 9 months ago #178138
by saovry
Search Tool can't search number from Drop-down Selection. was created by saovry
Drop-down Selection.
5 Years Old
6 Years Old
7 Years Old
8 Years Old
9 Years Old
If I search "5 Ye", No results found!
If I search " Yea", the result will show. (They can read space but can't read number)
It seems the K2 search can't search the value of numbers from the drop-down selection.
I am using K2 v2.10.4 [Dev Build 20210205]
thank
Could you check it..
thank
5 Years Old
6 Years Old
7 Years Old
8 Years Old
9 Years Old
If I search "5 Ye", No results found!
If I search " Yea", the result will show. (They can read space but can't read number)
It seems the K2 search can't search the value of numbers from the drop-down selection.
I am using K2 v2.10.4 [Dev Build 20210205]
thank
Could you check it..
thank
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
3 years 9 months ago #178150
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Search Tool can't search number from Drop-down Selection.
This is not a K2 issue actually. It's a setting in the database which by default does not search for anything less than 3 characters. "5 Ye" is 2 words with less than 3 characters length each.
So unless you can modify your database's configuration, you can't do much about this.
But do try searching for "5 Ye" using the double quotes and it'll probably work, as K2 will use the entire string to search in the database (including the space).
So unless you can modify your database's configuration, you can't do much about this.
But do try searching for "5 Ye" using the double quotes and it'll probably work, as K2 will use the entire string to search in the database (including the space).
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- saovry
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 53
3 years 9 months ago #178157
by saovry
Replied by saovry on topic Search Tool can't search number from Drop-down Selection.
My database will search with 4 words.
If I search " yea" it will show the result because it is 4 word. The search will start from space to the last letter a. There are 4 word. They will show many results.
In my case I want to search whose is 5 year.
So I will search "5 ye", there is no result. And it is 4 words already. Number 5 is one and letter e is number 4, but for this case K2 search don't search number 5. It starts search from space to letter e. And it is only 3 words.
It is the really problem. I search "5 yea", the search will show many result.. It is wrong for me because I want to search who is 5 years old.
Thank you..
If I search " yea" it will show the result because it is 4 word. The search will start from space to the last letter a. There are 4 word. They will show many results.
In my case I want to search whose is 5 year.
So I will search "5 ye", there is no result. And it is 4 words already. Number 5 is one and letter e is number 4, but for this case K2 search don't search number 5. It starts search from space to letter e. And it is only 3 words.
It is the really problem. I search "5 yea", the search will show many result.. It is wrong for me because I want to search who is 5 years old.
Thank you..
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
3 years 9 months ago #178160
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Search Tool can't search number from Drop-down Selection.
If you don't explicitly use double quotes in your search, the any spaces inbetween words are evaluated as OR statements and any spaces before/after what you type are trimmed.
"yea" is also searched because it's 3 characters.
Like I said, it's a database configuration thing.
For InnoDB it's this: dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_ft_min_token_size
For MyISAM it's this: dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_ft_min_word_len
Pass these on to your server host - they may have no issue adjusting their database config (but I highly doubt they will do so).
"yea" is also searched because it's 3 characters.
Like I said, it's a database configuration thing.
For InnoDB it's this: dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_ft_min_token_size
For MyISAM it's this: dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_ft_min_word_len
Pass these on to your server host - they may have no issue adjusting their database config (but I highly doubt they will do so).
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- saovry
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 53
3 years 2 months ago #179521
by saovry
Replied by saovry on topic Search Tool can't search number from Drop-down Selection.
Hello Fotis,
I think cause of one character or one word or two words, I think k2 can’t read number from Drop down Selection
K2 can read number from title and article.
1. Here is the test
Username ; Guest
password : guest
2. go to this page khmercdp.org/index.php/component/k2/itemlist/category/1-khm001
3. You can try to search 555555, the result should display is this ID : khm0011065
3. When you search word year so you will see many result
thank u
I think cause of one character or one word or two words, I think k2 can’t read number from Drop down Selection
K2 can read number from title and article.
1. Here is the test
Username ; Guest
password : guest
2. go to this page khmercdp.org/index.php/component/k2/itemlist/category/1-khm001
3. You can try to search 555555, the result should display is this ID : khm0011065
3. When you search word year so you will see many result
thank u
Attachments:
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
3 years 2 months ago #179536
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Search Tool can't search number from Drop-down Selection.
Actually, K2 does search the extra fields: github.com/getk2/k2/blob/master/plugins/search/k2.php#L104
Check that specific K2 item's entry in your database and more specifically, the value in the "extra_fields_search" column for that item.
Check that specific K2 item's entry in your database and more specifically, the value in the "extra_fields_search" column for that item.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Search Tool can't search number from Drop-down Selection.