Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Subject searching: msg#00005

Subject: Re: Subject searching
Sorry in advance for the long email, but I don't know how else to
describe this briefly.

I think I've completed my research on searching in Emilda and have a
few suggestions I would like to offer.  If acceptable, I can help on
implementing them (however, I will be away from the computer August 12-18,
so my work may be a little delayed).

Anyway, I want to hear what you think first.

1.  Set up the following CCL profile:

    @and &&
    @or  ||
    @not !

    Rational:  Currently, the following title create search errors
    without special quoting or capitalization from the user:
       and i saw a new heaven
       and then there were three
    It seems better to use non-letters for these operators to avoid
    confusion.

    lib/search.inc function generate_ccl (possibly others) require
    a corresponding change.

2.  Implement an advanced search that is more flexible, similar to:

http://lcweb.loc.gov/cgi-bin/zgate?ACTION=INIT&FORM_HOST_PORT=/prod/www/data/z3950/locils.html,z3950.loc.gov,7090&CI=115937

    I don't like exactly the above example, but the idea is there (see
    attached search.html for an alternative).

    A.  Number of rows could be configurable from preferences located in
        MySQL.
    B.  Search field option populated by the same logic as "Search by:"
        from search.php, plus the additional field "All Fields";
        defaulting to "All Fields".
    C.  An option for how to process the tokens will contain "any",
        "all"; defaulting to "all".
    D.  A text field in which the user would type free text for
        searching within item selected from "B".  Similar to Google,
        searching for exact phrase would require the user surrounding
        the phrase by quotes.  (For subjects, it would be interesting to
        have the "subject widget" used elsewhere in Emilda for this, but
        perhaps this can be left for later, since it my be too
        limiting and require javascript.)
    E.  At the beginning of each 2nd and remaining rows, option
        populated by "and", "or", "and not"; defaulting to "and".

Rules for constructing CCL from the above (logic should be correct
although current Emilda CCL Qualifiers are probably not correct):

Example Qualifiers for below logic:

$fields["Author"] = "1=1004 t=3";
$fields["Title"] = "1=4 t=3";
$fields["Subjects"] = "1=21 t=3";

$fields["AuthorAll"] = "1=1004 t=3 s=al";
$fields["TitleAll"] = "1=4 t=3 s=al";
$fields["SubjectsAll"] = "1=21 t=3 s=al";

$fields["AuthorAny"] = "1=1004 t=3 s=ol";
$fields["TitleAny"] = "1=4 t=3 s=ol";
$fields["SubjectsAny"] = "1=21 t=3 s=ol";

Logic to make CCL string:

loop through rows
   if D is not ""
      0.  if second row or higher, add E to CCL string, via the
          following mappings:

          and = &&
          or = ||
          and not = && !

      1.  whatever is in B should already be correct, add to CCL string
      2.  if C = "any", add "Any" to string (no preceding space).
          if C = "all", add "All" to string (no preceding space).
      2.  add " = ( "  (without the quotes) to CCL string
      3.  add contents of C to search string
      4.  add " ) " (without the quotes)

I'll attach some crude html for an example layout.

To link this back to the issue below, here is what the CCL should
read:

SubjectsAll = ( Handbells Piano )

And here is how I would fill out the attached html to achieve this:

Search: Subjects for all of: Handbells Piano

Thanks,
Dave.

On Tue, Jul 13, 2004 at 05:17:37PM -0600, David Everly wrote:
> On Mon, Jul 12, 2004 at 09:42:17AM +0300, Christoffer Landtman wrote:
> > First now when You raised the issue I realized that there was something 
> > wrong in the search logics concerning the searching of subjects. The 
> > search query "Handbells and Piano" is the logically correct one, as You 
> > maybe also realized, but with the current setup, Zebra does not do the 
> > thing that we tell it to do. It searches for a subject field containing 
> > both "Handbells" and "Piano" which does of course not exist, as all 
> > subjects are added in separate fields. Thus I will take this issue up 
> > with the Indexdata people and see what would be the correct solution, 
> > and post the result here then on the list.

-- 
Encrypted Mail Preferred:
    Key ID:  8527B9AF
    Key Fingerprint:  E1B6 40B6 B73F 695E 0D3B  644E 6427 DD74 8527 B9AF
    Information:  http://www.gnupg.org/
                                                                                
ASCII ribbon campaign:
()  against HTML email
/\  against Microsoft attachments
    Information:  http://www.expita.com/nomime.html

Emilda Advanced Search

If you want to search for an exact phrase, please enclose it in quotes.

Search: All Fields Book ID ISBN Author Title Subjects for all any of:
and or and not All Fields Book ID ISBN Author Title Subjects for all any of:
and or and not All Fields Book ID ISBN Author Title Subjects for all any of:
and or and not All Fields Book ID ISBN Author Title Subjects for all any of:
and or and not All Fields Book ID ISBN Author Title Subjects for all any of:
and or and not All Fields Book ID ISBN Author Title Subjects for all any of:

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>