PDA

View Full Version : Searching a string containing the % or $ sign


JG867
05-07-2008, 03:02 PM
Hi,

I'm using the free javascript version (just until I convince the money-holders otherwise, so I need to get this to work properly first).

I've come across an issue with searching for a string which contains the % sign. For instance, this would be a setting or a file name, such as %FILE%.

When I perform a search on %FILE%, the first issue I have is that the search result says, "Search results for FILE" and ignores the % sign. In this case, I do receive a search result link, but when I click on that link, nothing is highlighted (this is the same result I get as indicated in the next paragraph with the $MYROOT* example). So, I tried just searching for the % sign, which gave me zero results found and the message saying "the word is in the skip list". Hmm...I checked and it's not listed. I even took the "skip words less that 2" option down to zero just for fun. I re-indexed and received the same result. How can I get zoom to recognize the % sign?

The second issue I am having is that when I perform a wildcard search on a string such as $MYROOT*, I receive the correct result link, but when I click on the search result, the expected terms involving $MYROOT* are not highlighted - actually nothing is highlighted in the file. (and yes, subsequent searches performed on this file yields highlighted results - so I know highlight is working!). Any ideas on how to resolve this?

I hope I explained myself clearly!

thanks for your help!

JG867
05-07-2008, 03:11 PM
Also, when I perform a search on an entire string containing the % sign, such as

%FILE%/library/custom.lib

the search results returns "Search Results for FILE/library/custom.lib" (notice no % sign) and incorrectly says no results found. (and yep, the search term is in there!)

The Indexing Word Rules settings I have toggled on are:

Dots
Hypen
Hash Sign
Dollar Sign
Underscores
Slashes.

thanks in advance!

Ray
05-08-2008, 02:13 AM
The "%" sign is stripped and not used in the search query, as are most punctuation marks and non-alphanumeric characters. The only exception are the options for word joining, and the percentage sign is not available as an option in the current version.

I'll put you down for a feature request for the "%" sign to be added as an option in the word join rules.

In this case, I do receive a search result link, but when I click on that link, nothing is highlighted (this is the same result I get as indicated in the next paragraph with the $MYROOT* example).

I presume you are referring to highlighting performed by the "jump to highlighting script" we provide here (http://www.wrensoft.com/zoom/support/highlighting.html).

There is a list of "Known Limitations" for the highlighting script, and it is documented at the bottom of this troubleshooting page (http://www.wrensoft.com/zoom/support/faq_highlight.html) which should explain the behaviour you are seeing.

The situation you describe is expected, due to the practical limitations of what the highlighting script can do, and how it is unaware of the word rules that the search script may have applied. Adding such capabilities would further restrict the compatibility (see the Troubleshooting section in the aforementioned link) of the highlight script by increasing its complexity, and we do not have any plans to do this at this stage.

The "jump to highlighting" script is not designed to highlight all keywords that were found by the search process. Doing so would be technically inefficient, and in some cases impossible (e.g. a match may have been a synonym that does not appear on the page, or a word in the meta description which does not show up on the actual page). It is only an additional tool which highlights most of the direct matches where it is convenient.

JG867
05-08-2008, 02:38 PM
Yes, please add the % sign to the list of feature requests as an option for word joining. The docs I am working on are of a technical nature and the % sign is used quite often in filepaths...

Also - many thanks for the feedback on the expected behavior of the jump to highlighted match script. I really try to read all of the documentation and search forums before I posted...(honest!), but yet another piece of information got overlooked on my side..... :-)

thanks again