Download presentation
Presentation is loading. Please wait.
Published byLynette Hoover Modified over 9 years ago
1
LIS618 last lecture building a search interface Thomas Krichel 2011-11-01
3
structure of talk Build from an example. http://collec.repec.org It is shaky at this time because of issues of UTF-8 encoding.
4
data is in a relational database mysql> describe ras_biwe_nodes; – | Field | Type | Null | Key | Default | Extra | – +---------------------+------------------+------+-----+ – | handle | varchar(10) | NO | PRI | | | – | name | varchar(100) | YES | | NULL | There are other fields in the table but these are the ones that we are interested in.
5
search box There is no general search option. The search only operates from the page of a given node. The search is to identify a destination node. The node can be found by handle or by name.
6
code A version of the code is available at http://wotan.liu.edu/home/krichel/courses/lis 618/code/search.pm.html This a Perl module written to do the search. It’s geeky stuff written by yours truly.
7
finding by handle If somebody has registered with the RePEc Author Service, her record has a handle. That handle starts with a ‘p’. Then follow two letters that come from the person’s last name, usually the first two. The comes a number. This number increments. Thomas Krichel is pkr1.
8
search by handle When a user enders something of the form, p2ln where 2l are two lowercase letters and n is a number, we assume the user is givng as a handle to look for. We then try to find in the handle column of a handle that is identitical to the one that the user has entered can be found.
9
handle search result If the handle search gives us a handle, we have found the target person. We can then proceed to search for the shortest paths and show them to the searcher. Otherwise, we issue a polite error message. This is what function analyse_destination_as_handle does.
10
search by name This what the function analyse_destination_as_name does. It send a query to the database to find any name that contains the string searches. I.g. ‘ic’ will find krichel. It will also find a lot of other matches.
11
trim_results We are then trimming the results. First we look if there any words that are made up entirely of the query.
12
http://openlib.org/home/krichel Thank you for your attention!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.