Detail 1: Detail 2:
[The UI design above was copied from the UW Libraries advanced search page at http://www.lib.washington.edu/Resource/Search/ResSearch.asp?Reset=Yes . We modified it for our purposes.]
-
Description and Explanation for the Advanced Search feature:
The advanced search features is designed for the parents of the home-schooling families as well as for those children who may know or who may want to learn how to combine search terms. The combination of terms was done behind the scenes in quick search but here, we give our user the opportunity to combine terms themselves. The feature uses a total of 18 controls which allows the user a maximum of 4 conditions for each of up to 64 possible combinations of 4 fields, 2 functions, 4 terms and 2 logical operators. Do our users need this level of search complexity? As a general rule, no, and one may say that we are being prescriptive here. However, the Mecca team looks at the provision of this feature as a way of bringing our users to a level of search where they are more in control and where they can be more involved in search. On a more practical level, the advanced search feature allows the user to search on information that was not covered in the quick search feature. This includes the ability to search for recordings of an artist or recordings of a song between this year and that year, the ability to do full-text searching of other text-based data that we have in our system such as artist biographies, instrument descriptions, and album reviews.
Friendly Name
|
System Name
|
Control Type
|
Hooked to What in the RDB or IR system?
|
The ff set of 4 names are repeated for each of the 3 drop-down boxes under the Field column label.
Song Title
Artist Name
Album Title
Keyword
|
A drop-down box has two or more options but only has one name to refer to. The ff are the names of the 3 boxes under the Field column:
c_drpField1
c_drpField2
c_drpField3
|
drop-down box
|
Repeat the ff for the other two drop-down boxes under the Field column.
c_drpField1.value(“Song Title”) is hooked to the Song_Name field of the Song table in the RDB.
c_drpField1.value(“Artist Name”) is hooked to the Artist_Name field of the Artist table in the RDB.
c_drpField1.value(“Album Title”) is hooked to the Album_Title field of the Album table in the RDB.
c_drpField1.value(“Keyword”) is hooked to the inverted index file for artist biographies, album commentary, lyrics, and instrument descriptions in the IRS.
|
The ff set of two names repeat for the drop-down boxes under the Function column label:
contains
equals
|
See note above about drop-down boxes:
c_drpFunc1
c_drpFunc2
c_drpFunc3
|
drop-down box
|
Repeat the ff for the other two drop-down boxes under the Function column:
These controls are not hooked to the RDB nor the IR but they add functions to the search combination.
“Function selects whether the term is a literal string to be compared against the field (equals) or a series of space-separated keywords (contains). -- UW libraries notes ”
|
Column label:
Terms
|
c_txtTerms1
c_txtTerms2
c_txtTerms3
|
textbox
|
In combination with the options selected by the user under the Field column plus the function selected u, these textboxes are hooked to the same fields in the RDB or IR.
Example: will hook to the Song_Name of the Song table in the RDB.
|
Column label:
Term Logic
|
3 pairs of OR and AND buttons:
c_optOR1
c_optAND1
c_optOR2
c_optAND2
c_optOR3
c_optAND3
|
radio/option buttons
|
“If function is contains, then Term Logic refers to how the space-separated terms are combined.” – UW libraries.
The default value is AND.
Example:
------
will parse into OR statements.
|
The last Where condition in the column – Where And And And.
|
c_txtYear1
c_txtYear2
|
textbox
|
Hooked to the Recording_Date of the Recording table in the RDB.
|
Search
|
c_cmdSearch
|
Submit button
|
Calls the page specified in the Action attribute of the search form and submits whatever combination of search fields and terms the user has indicated in the controls.
|
-
Logic and Queries for the Advanced Search feature: [There is a change of presentation in this section due to the large number of possible queries in the Advanced Search feature. The logic and queries are also combined to explain more succinctly the queries to be built under such and such conditions possible in the advanced search feature.]
-
User enters one term:
Example1:
Parse the term as a series of space-separated keywords and AND them.
SQL: SELECT Song.Song_ID, Song.Song_Name FROM Song WHERE Song.Song_Name LIKE “<*c_txtTerms1*>” ORDER BY Song.Song_Name
Example 2:
Take the term as a literal string and match it against the field.
SQL: SELECT Album.Album_ID, Album.Album_Title FROM Album WHERE Album.Album_Title =“” ORDER BY Album.Album_Title
-
If user enters two terms:
Example1: OR
Parse the as a series of space-separated keywords and AND them.
Take as a literal string and match it against the field.
OR and
SQL: SELECT Song.Song_ID, Song.Song_Name, Album.Album_ID, Album.Album_Title
FROM Song JOIN Recording ON Song.Song_ID=Recording.Song_ID JOIN Album ON Recording.Album_ID=Album.Album_ID WHERE Song.Song_Name LIKE “<*c_txtTerms1*>” OR Album.Album_Title = “”;
Example2: AND
Parse the as a series of space-separated keywords and AND them.
Take as a literal string and match it against the field.
AND and
SQL: SELECT Song.Song_ID, Song.Song_Name, IRinvertedFile_AccessionNumber
FROM Song JOIN IRinvertedFile ON Song_Lyrics=IRinvertedFile.AccessionNumber
WHERE Song.Song_Name LIKE “<*c_txtTerms1*>” AND IRinvertedFileTerm=“”;
-
If user enters three terms:
Example: OR AND
Parse the as a series of space-separated keywords and AND them.
Take as a literal string and match it against the field.
Parse the as a series of space-separated keywords and AND them.
OR and
AND and
SQL: SELECT Song.Song_ID, Song.Song_Name, Album.Album_ID, Album.Album_Title, Artist.Artist_ID, Artist.Artist_Name
FROM Song JOIN Recording ON Song.Song_ID=Recording.Song_ID
JOIN Album ON Recording.Album_ID=Album.Album_ID
JOINArtist ON Recording.Artist_Performer=Artist.Artist_ID
WHERE Song.Song_Name LIKE “<*c_txtTerms1*>”OR Album.Album_Title =“” AND Artist.Artist_Name LIKE <*c_txtTerms3*>”;
-
If user enters four terms:
Example: contains OR equals AND contains AND
Between and
Parse the as a series of space-separated keywords and AND them.
Take as a literal string and match it against the field.
Parse the as a series of space-separated keywords and AND them.
Check if data value is found between two date values.
SQL: SELECT Song.Song_ID, Song.Song_Name, Album.Album_ID, Album.Album_Title, Artist.Artist_ID, Artist.Artist_Name, Recording.Recording_ID, Recording.Recording_Name
FROM Song JOIN Recording ON Song.Song_ID=Recording.Song_ID
JOIN Album ON Recording.Album_ID=Album.Album_ID
JOIN Artist ON Recording.Artist_Performer=Artist.Artist_ID
WHERE Song.Song_Name LIKE “<*c_txtTerms1*>”OR Album.Album_Title =“” AND Artist.Artist_Name LIKE <*c_txtTerms3*>” AND BETWEEN and ;
If no matches, use the same page used in basic search to show the user a message saying there are no matches to his query and to please try another search.
As in Quick Search, all queries from the search form are submitted to the same page for processing. This case contains codes using If-Then-Else statements to specify the processing and presentation of data depending on the user’s query. This page will most likely use looping codes to go through a recordset and to place data values within html templates. Results presentation requires html templates which will make names and titles hyperlinks but associated with unique record IDs which when clicked will pass on the unique ID for the processing of details pages.
Share with your friends: |