Wednesday, May 23rd

Last update05:36:30 AM GMT

Font Size

Screen

Profile

Layout

Menu Style

Cpanel
Welcome, Guest
Username Password: Remember me

No search results when there is a dash in the search term
(1 viewing) (1) Guest
Got a Joomla problem? Post as much detail about it as you can here to see if you can get a solution.

Where possible, include URL for the site or page having issues, what version of Joomla you're using, what type of server (eg Cpanel, WAMP, IIS), what components may be installed, and specific error messages you're encountering.

If you think your problem is particularly obscure, you might be better posting it to the forums at joomla.org as there's thousands more people to help you.
  • Page:
  • 1

TOPIC: No search results when there is a dash in the search term

No search results when there is a dash in the search term 9 months, 3 weeks ago #4616

  • Jennifer
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Hi everyone,
I have a new site setup where there is a comprehensive knowledge hub of projects. I am using K2 and am utilising the Extra Fields extensively. Each project/item has a specific project number and we have set this as an Extra Field.

Doing some search testing, it appears that if a project number has a dash in it (some do, some don't), then no results will be returned. Even if you just use 3 of the letters/numerals in the full number and not put the dash into the search box. However if you use 4 consecutive letters/numerals in the full project number, a result will appear. Problem is the project numbering system the client is using is not consistent hence why project numbers are all different lengths, some containing dashes, some not.

This is slightly confusing so here's some examples of my searches and results:

  • Searching for '416-002' brings up no results (when it should in fact bring up the project that has that exact number in the extra field: www.smartwater.com.au/knowledge-hub/reso...es-in-melbourne.html). If you search for just '416', still 0 results come up.
  • Searching for '413' on its own will bring up the correct single result which is an item with the project number '413003'. Originally this had a dash as the project number above but I removed it as part of this testing process.
  • Searching for '32m-2035' brings up 2 results for projects that have ‘2035’ in the number so it is happy to search for the 4 numerals in one go, and ignores the fact that there's a dash so won't bring up the single result for the exact item with that project number.
  • Searching for '1164' brings up the correct single result.


I don't imagine anyone has had a situation where there are so many different search terms being used in this way, but does anyone understand why/if it is the dash that is causing all these issues or if search string restrictions of some other kind would be effecting this?

Thanks for any insight anyone might have...!
Jen

Re: No search results when there is a dash in the search term 9 months, 2 weeks ago #4642

  • PtrNrs
  • OFFLINE
  • Administrator
  • Posts: 235
  • Karma: 10
Hi, Jen.

Sorry, I'm not a K2 person so I can't really help you with that side of it. BTW, what search tool are you using, Joomla's in-built search or K2's?

With the database query bit I might be able to help you more. When you turn on Debug System dcan you see which queries are being used to search that database? Please send them to me . . . or maybe you can give the link to the site.
Pete Nurse,
Melbourne Joomla User Group www.joomla.org.au/melbourne-user-group

Re: No search results when there is a dash in the search term 9 months, 2 weeks ago #4646

  • Jennifer
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Joomlaworks have told me that dashes (and other such characters) are not evaluated on search. This is true for both Joomla's default search and K2 search. If this is the case, then fine. But I am still baffled as to why a set of 4 numbers will be found (even if there is a dash in the search string) but a set of 3 numbers won't be. I think this has something to do with search overall.

Thanks for replying Pete - much appreciated. Site link is: www.smartwater.com.au. I'm not really sure what you mean by using Debug System to delve any further into this...?
  • Page:
  • 1
Moderators: Partic
Time to create page: 0.39 seconds
You are here: Forum