- Posts: 39
COMMUNITY FORUM
searching numerical strings
- Andrew Neighbour
-
Topic Author
- Offline
- Junior Member
Less
More
14 years 4 months ago #91744
by Andrew Neighbour
searching numerical strings was created by Andrew Neighbour
For some reason, I cannot search on numerical strings on my K2 site. Regardless of whether the number is in the item title, as in 288-Antique Chinese Hat or in the description text, or in the additional fields.
I have read about the extrafiels searching issue and to avoid that, we are placing the SKU number in the item title. But searching on 288 doesn't work; searching on antique does?
Even stranger, I have this working on a different K2 site - and on that one I can even search on extra fields without adding any extra components...
Does anyone have suggestions as to why the numbers don't show up. I have tried other search modules, none seem to work...
Thanks,
Andrew
I have read about the extrafiels searching issue and to avoid that, we are placing the SKU number in the item title. But searching on 288 doesn't work; searching on antique does?
Even stranger, I have this working on a different K2 site - and on that one I can even search on extra fields without adding any extra components...
Does anyone have suggestions as to why the numbers don't show up. I have tried other search modules, none seem to work...
Thanks,
Andrew
Please Log in or Create an account to join the conversation.
- Andrew Neighbour
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
14 years 4 months ago #91745
by Andrew Neighbour
Replied by Andrew Neighbour on topic searching numerical strings
I tried the solution in this post:
community.getk2.org/forum/topics/problem-with-the-new?commentId=3536014%3AComment%3A36749
but it didn't work.
Anyone else got any ideas...
community.getk2.org/forum/topics/problem-with-the-new?commentId=3536014%3AComment%3A36749
but it didn't work.
Anyone else got any ideas...
Please Log in or Create an account to join the conversation.
- Andrew Neighbour
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
14 years 3 months ago #91746
by Andrew Neighbour
Replied by Andrew Neighbour on topic searching numerical strings
OK - I have figured out why this is not working. Turns out that the search engine ignores all strings in the site that consist of less than 3 characters. This is true for numbers and words. So in my case if the SKU number is only 3 digits, no result is returned. If four digits, putting 2, 3 or 4 matching digits in the search field returns results that exist in the database with 4 or more digits.
I presume this is done to reduce unwanted hits against common words (conjunctions, prepositions, etc).
However it would be nice to be able to change a setting that allows one to define the minimum number of numerical digits that constitute a real number - otherwise I have to get the client to change all their skus...
Any thoughts on this?
Andrew
I presume this is done to reduce unwanted hits against common words (conjunctions, prepositions, etc).
However it would be nice to be able to change a setting that allows one to define the minimum number of numerical digits that constitute a real number - otherwise I have to get the client to change all their skus...
Any thoughts on this?
Andrew
Please Log in or Create an account to join the conversation.
- Linda Cronsten
-
- Offline
- Junior Member
Less
More
- Posts: 28
14 years 3 months ago #91747
by Linda Cronsten
Replied by Linda Cronsten on topic searching numerical strings
I have the same problem, I have a site where I have a directory of University programs and courses. I found a way around this. Not a nice one, but it seems to work. Before, if I tried to search for 120 hp, I got no hits at all, but I found out that if I put 120hp (without a space between) in my metadata it actually searches and finds both 120 and 120 hp. As I said, not a very good solution, but since this just have to work it's better than nothing.
/Linda
Andrew Neighbour said:
OK - I have figured out why this is not working. Turns out that the search engine ignores all strings in the site that consist of less than 3 characters. This is true for numbers and words. So in my case if the SKU number is only 3 digits, no result is returned. If four digits, putting 2, 3 or 4 matching digits in the search field returns results that exist in the database with 4 or more digits.
I presume this is done to reduce unwanted hits against common words (conjunctions, prepositions, etc).
However it would be nice to be able to change a setting that allows one to define the minimum number of numerical digits that constitute a real number - otherwise I have to get the client to change all their skus...
Any thoughts on this?
Andrew
/Linda
Andrew Neighbour said:
OK - I have figured out why this is not working. Turns out that the search engine ignores all strings in the site that consist of less than 3 characters. This is true for numbers and words. So in my case if the SKU number is only 3 digits, no result is returned. If four digits, putting 2, 3 or 4 matching digits in the search field returns results that exist in the database with 4 or more digits.
I presume this is done to reduce unwanted hits against common words (conjunctions, prepositions, etc).
However it would be nice to be able to change a setting that allows one to define the minimum number of numerical digits that constitute a real number - otherwise I have to get the client to change all their skus...
Any thoughts on this?
Andrew
Please Log in or Create an account to join the conversation.
- Andrew Neighbour
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
14 years 3 months ago #91748
by Andrew Neighbour
Replied by Andrew Neighbour on topic searching numerical strings
I fixed mine by convincing the client to add leading zeros to their sku numbers so that each was a minimum of 4 digits. Your approach should work if a future client doesn't want to do that. Thanks, A
Please Log in or Create an account to join the conversation.
- Alessandro Cingerla
-
- Offline
- New Member
Less
More
- Posts: 3
14 years 1 month ago #91749
by Alessandro Cingerla
Replied by Alessandro Cingerla on topic searching numerical strings
Hi. I've tried every search plugin but without any solution. Articles on the shop I've just st up are a name with number: if you want to search the name, everything works fine but if cannot search for the number es. 525-14. Thanks, Alessandro
Please Log in or Create an account to join the conversation.