koha-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-bugs] [Bug 753] New: Apostrophes and commas cause marc_word search


From: bugzilla-daemon
Subject: [Koha-bugs] [Bug 753] New: Apostrophes and commas cause marc_word search to fail
Date: 22 Mar 2004 15:43:05 -0000

http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=753

           Summary: Apostrophes and commas cause marc_word search to fail
           Product: Koha
           Version: CVS
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalogue
        AssignedTo: address@hidden
        ReportedBy: address@hidden
         QAContact: address@hidden


The new (HEAD) search.marc/search.pl and SearchMarc.pm fail when a comma or an
apostrophe is present in the search term(s).

Two examples:

* search for author "Henry, Sue" converts to a "like 'Henry,%' and like 'Sue%'"
select on marc_word, which fails because of the comma (commas cannot be stored
in marc_word);

* search for title "I'll be home for Christmas" fails because marc_word removes
apostrophes (which is a good thing to do for the French language?, certainly not
good for the English language) and the search finds no "I'll" in marc_word.

To fix the first example, commas should be stripped from the end of search terms
($term=~ s/,$//).  Commas in the middle of a term could indicate sloppy typing
by the searcher, e.g. "Henry,Sue" with no space between terms.  In the case of a
comma in the middle of a term, the comma should be used to split the term into
two separate terms.

To fix the second example, assuming that marc_word still does not save
apostrophes, then search terms containing an apostrophe should be ignored. 
Stripping the apostrophe from the term ("I'll" becomes "Ill") would result in
incorrect "hits" in marc_word and sloppy search results.



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]