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

XHELP Searching



Following are some ideas I had for allowing searching in XHELP.

As always, comments are welcome.

Ken Duck
twoducks@globalserve.net

*****************************************************

XHELP SEARCH design
===================

1. Introduction
2. Search system components
3. Database structure
4. Implementation discussion

1. Introduction
---------------
  In order for the xhelp system to provide efficient and accurate
  search results some form of database should be used, as opposed
  to performing real time searching of the files themselves.

  The most portable method would be to access an SQL database, since
  there are many databases which implement SQL which would allow
  a switch to a different database depending on the system which is
  being used.

  The following section describes the components of the search
  system, and the third section discusses the structure of the
  database tables. The final section discusses implementation
  details in brief.

2. Search system components
---------------------------
  There are several components which are needed for the search system.
  a. The database itself
  b. Table creation and updating program
  c. Modules to provide the search information for various document
types
  d. UI for the user to search the database.

3. Database structure
---------------------
  The following tables would be used, the format being:
  TABLE_NAME
    COLUMN1
    COLUMN2
    ...

  TOPIC_TABLE
    TOPIC_NAME PRIMARY KEY

  IMPLEMENTATION_TABLE
    TOPIC_NAME FOREIGN KEY
    FULL_FILE_NAME

  KEYWORD_TABLE
    KEYWORD
    TOPIC_NAME FOREIGN KEY

  Further tables may be added if further text should be searched. For
example
  if the body of the text should be searched then a table will need to
be
  created to provide the data.

4. Implementation Discussion
----------------------------
  Implementation details are sketchy at the moment. For the time being
  the database being used is mySql. It is free and easy to install and
  use.

  In order to acheive rapid prototyping the command line interface to
  mySql will be used. This also allows other databases with command line

  interfaces to be substituted with minimal code change (especially
since
  sql is being used and is common between databases.)

  The table creation program is being written in a scripting language,
  since it is both simple and provides easy interfaces to other programs

  (such as mySql and the modules.)

  The modules may be written in any language. They receive data on which

  file to get the information from via command line arguments. Data is
  returned by writing to standard output.