Zim

Search and Find act differently regarding case-sensitivity and "whole words only"

Bug #521056 reported by Oliver Joos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Unassigned

Bug Description

I use zim 0.43 on Ubuntu 9.10.

Search a notebook is case-insensitive but finds only whole words.
Find in page is case-sensitive but finds also parts of a word.

It is very handy that clicking a Search result triggers Find (solved since Bug #279556). But this bug makes it a little confusing. I'd prefer a checkbox for case-sensitivity and one for "whole words only" both in Search and in Find. When clicking a Search result these checkboxes sould be transferred to those of Find.

The "whole words" issue might interfere with the discussion of Bug #506020 (about finding multiple words) and therefore would better be solved separately from the case-sensitivity.

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Did you check out the latest bazaar revision? There are several improvements in the tree already for both search and find.

Changed in zim:
status: New → Incomplete
Revision history for this message
Oliver Joos (oliver-joos) wrote :

I just upgraded to latest branch and saw that since rev193 the work is already in progress. :-)

Revision history for this message
Oliver Joos (oliver-joos) wrote :

I tested rev201: case-sensitivity now works as expected in both Search and Find! And so does Unicode support.

What's left is that Search only finds whole words and Find does not. A simple Search dialog without checkboxes is ok. I'd just change "Search" to match also parts of words. Perhaps the score could be changed to a float: whole words count 1.0 and parts count 0.3 or so.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

Sorry, I missed one: the new checkbox "Match case" in "Find" seems to do nothing yet - case never matters.

Changed in zim:
status: Incomplete → New
Revision history for this message
Oliver Joos (oliver-joos) wrote :

As I wrote in #3 and #4 this bug is fixed, except that "Match case" in "Find" does nothing. I tested rev208 and changed this bug to New to prevent it from being forgotten. (I hope this is ok)

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fixed last item also in rev209.

Changed in zim:
status: New → Fix Committed
Changed in zim:
status: Fix Committed → Fix Released
Revision history for this message
Oliver Joos (oliver-joos) wrote :

I tested it and found one issue left!

Search a notebook still only finds whole words, whereas Find in page finds also parts of a word. I would expect that Search a notebook also matches parts of words. This might be particularly useful for languages like German where words often are built from simpler words. But it is also nice to find singular and plural with only one Search.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 521056] Re: Search and Find act differently regarding case-sensitivity and "whole words only"

On Tue, Apr 13, 2010 at 2:01 AM, Oliver Joos <email address hidden> wrote:
> I tested it and found one issue left!
>
> Search a notebook still only finds whole words, whereas Find in page
> finds also parts of a word. I would expect that Search a notebook also
> matches parts of words. This might be particularly useful for languages
> like German where words often are built from simpler words. But it is
> also nice to find singular and plural with only one Search.

This is intended behavior, you can match parts of words in search by
using a "*", e.g. "web*" will match "webpage", "website" etc.

Plurals are a special case. Ideally we would want to account for them,
but I lack a dictionary how to get the proper plural in most language
other than english.

The reason Find is different is that you want to see the match while you type.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

Ok - this bug is not only solved. The new search features are just GREAT!!

Perhaps a tooltip for the search field would be helpful for newbies, saying something like "Search expression (may contain AND, OR, NOT and words with *)".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.