Thanks Gilles and Douglas for your help,

I have managed to get htDig working from command line prompt, using 'htsearch -c 
<config_file>'

It seems that when I was using the command 'htsearch' on its own, it was running a 
different version of htDig with a different (older) database.  So before, whenever I 
was re-indexing different directories and then using 'htsearch'... old results kept 
coming up!

At the moment, I don't know where the other isntallation of htsearch/conf/db files may 
be.

However, for now 'htsearch -c <config_file>' on the command line seems to be working 
fine.

Now I have the problem where my search.html form keeps reading the old database.  As I 
don't want to edit htsearch.cc to get it to recognise the -c option from the web 
server.

What should I do to ensure that a new installation of htsearch only looks at the 
latest database files ? (my CONFIG and htdigs.conf are attached at end of email)

I do have another question relating to indexing:

when indexing the directory http://10.5.1.199/test/

which has ONLY the files tea.html and coffee.html,

http://10.5.1.199/test/coffee.html
http://10.5.1.199/test/tea.html

why does it index the following URL's:

http://10.5.1.199/test/?N=D
http://10.5.1.199/test/?M=A
http://10.5.1.199/test/?D=A
http://10.5.1.199/test/?N=A
http://10.5.1.199/test/?D=D
http://10.5.1.199/test/?M=D
http://10.5.1.199/test/?S=D

i've noticed it do this every time i run rundig... and these URLs come up in the 
search reslts too.

?

Cheers,
Shams

================================

CONFIG
==============

##
## CONFIG
##
## This file is part of ht://Dig
##

#
# These variables are set by configure
#
# This specifies the root of the directory tree to be used by ht://Dig
prefix=                 /home/httpd/html/htdig

# This specifies the root of the directory tree to be used for programs
# installed by ht://Dig
exec_prefix=            ${prefix}

#
# Please modify the variables below to reflect your preferences.
#

#
# DEST
#
# This specifies the root of the directory tree to be used by ht://Dig
#
DEST=                  $(prefix)

#
# BIN_DIR
# Set this macro to where you want the binaries to be installed.
#
BIN_DIR=               ${exec_prefix}/bin

#
# CONFIG_DIR
# This is the directory that contains ht://Dig configuration files
#
CONFIG_DIR=            ${prefix}/conf

#
# COMMON_DIR
# This is the directory for files that can be shared between different
# databases.
#
COMMON_DIR=            ${prefix}/common

#
# DATABASE_DIR
# The default directory where the search databases will reside.
#
DATABASE_DIR=          ${prefix}/db

#
# DEFAULT_CONFIG_FILE
# This macro defines where the various programs will look for a configuration
# file.
#
DEFAULT_CONFIG_FILE=   ${CONFIG_DIR}/htdigs.conf

#
# CGIBIN_DIR
# The directory where your HTTP server looks for CGI programs.  This is where
# htsearch will get installed.
#
CGIBIN_DIR=             /home/httpd/html/cgi-bin

#
# IMAGE_DIR
# Define this to be a place that can be accessed by your web server.  This is
# where a couple of images will be placed.
#
IMAGE_DIR=              /home/httpd/html/graphics

#
# IMAGE_URL_PREFIX
# This is the URL to prefix the images placed in IMAGE_DIR.
#
IMAGE_URL_PREFIX=        /htdig

#
# SEARCH_DIR
# Set this to the absolute path where you want the sample search form to
# be installed.
#
SEARCH_DIR=             /home/httpd/html

#
# SEARCH_FORM
# Set this to the name you want to give to the search form.  This form
# will be located in the SEARCH_DIR directory.
#
SEARCH_FORM=            searchs.html

================================

htdigs.conf
====================

#
# Example config file for ht://Dig.
#
# This configuration file is used by all the programs that make up ht://Dig.
# Please refer to the attribute reference manual for more details on what
# can be put into this file.  (http://www.htdig.org/confindex.html)
# Note that most attributes have very reasonable default values so you
# really only have to add attributes here if you want to change the defaults.
#
# What follows are some of the common attributes you might want to change.
#

#
# Specify where the database files need to go.  Make sure that there is
# plenty of free disk space available for the databases.  They can get
# pretty big.
#
database_dir:           /home/httpd/html/htdig/db

#
# This specifies the URL where the robot (htdig) will start.  You can specify
# multiple URLs here.  Just separate them by some whitespace.
# The example here will cause the ht://Dig homepage and related pages to be
# indexed.
# You could also index all the URLs in a file like so:
# start_url:           `${common_dir}/start.url`
#
start_url:              http://10.5.1.199/test/

#
# This attribute limits the scope of the indexing process.  The default is to
# set it to the same as the start_url above.  This way only pages that are on
# the sites specified in the start_url attribute will be indexed and it will
# reject any URLs that go outside of those sites.
#
# Keep in mind that the value for this attribute is just a list of string
# patterns. As long as URLs contain at least one of the patterns it will be
# seen as part of the scope of the index.
#
limit_urls_to:          ${start_url}

#
# If there are particular pages that you definitely do NOT want to index, you
# can use the exclude_urls attribute.  The value is a list of string patterns.
# If a URL matches any of the patterns, it will NOT be indexed.  This is
# useful to exclude things like virtual web trees or database accesses.  By
# default, all CGI URLs will be excluded.  (Note that the /cgi-bin/ convention
# may not work on your web server.  Check the  path prefix used on your web
# server.)
#
exclude_urls:           /cgi-bin/ .cgi

#
# Since ht://Dig does not (and cannot) parse every document type, this 
# attribute is a list of strings (extensions) that will be ignored during 
# indexing. These are *only* checked at the end of a URL, whereas 
# exclude_url patterns are matched anywhere.
#
bad_extensions:         .wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
        .jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi .css

#
# The string htdig will send in every request to identify the robot.  Change
# this to your email address.
#
maintainer:             [EMAIL PROTECTED]

#
# The excerpts that are displayed in long results rely on stored information
# in the index databases.  The compiled default only stores 512 characters of
# text from each document (this excludes any HTML markup...)  If you plan on
# using the excerpts you probably want to make this larger.  The only concern
# here is that more disk space is going to be needed to store the additional
# information.  Since disk space is cheap (! :-)) you might want to set this
# to a value so that a large percentage of the documents that you are going
# to be indexing are stored completely in the database.  At SDSU we found
# that by setting this value to about 50k the index would get 97% of all
# documents completely and only 3% was cut off at 50k.  You probably want to
# experiment with this value.
# Note that if you want to set this value low, you probably want to set the
# excerpt_show_top attribute to false so that the top excerpt_length characters
# of the document are always shown.
#
max_head_length:        10000

#
# To limit network connections, ht://Dig will only pull up to a certain limit
# of bytes. This prevents the indexing from dying because the server keeps
# sending information. However, several FAQs happen because people have files
# bigger than the default limit of 100KB. This sets the default a bit higher.
# (see <http://www.htdig.org/FAQ.html> for more)
#
max_doc_size:           200000

#
# Most people expect some sort of excerpt in results. By default, if the 
# search words aren't found in context in the stored excerpt, htsearch shows 
# the text defined in the no_excerpt_text attribute:
# (None of the search words were found in the top of this document.)
# This attribute instead will show the top of the excerpt.
#
no_excerpt_show_top:    true

#
# Depending on your needs, you might want to enable some of the fuzzy search
# algorithms.  There are several to choose from and you can use them in any
# combination you feel comfortable with.  Each algorithm will get a weight
# assigned to it so that in combinations of algorithms, certain algorithms get
# preference over others.  Note that the weights only affect the ranking of
# the results, not the actual searching.
# The available algorithms are:
#       accents
#       exact
#       endings
#       metaphone
#       prefix
#       soundex
#       substring
#       synonyms
# By default only the "exact" algorithm is used with weight 1.
# Note that if you are going to use the endings, metaphone, soundex, accents,
# or synonyms algorithms, you will need to run htfuzzy to generate
# the databases they use.
#
search_algorithm:       exact:1 synonyms:0.5 endings:0.1

#
# The following are the templates used in the builtin search results
# The default is to use compiled versions of these files, which produces
# slightly faster results. However, uncommenting these lines makes it
# very easy to change the format of search results.
# See <http://www.htdig.org/hts_templates.html> for more details.
#
# template_map: Long long ${common_dir}/long.html \
#               Short short ${common_dir}/short.html
# template_name: long

#
# The following are used to change the text for the page index.
# The defaults are just boring text numbers.  These images spice
# up the result pages quite a bit.  (Feel free to do whatever, though)
#
next_page_text:         <img src="/htdig/buttonr.gif" border="0" align="middle" 
width="30" height="30" alt="next">
no_next_page_text:
prev_page_text:         <img src="/htdig/buttonl.gif" border="0" align="middle" 
width="30" height="30" alt="prev">
no_prev_page_text:
page_number_text:       '<img src="/htdig/button1.gif" border="0" align="middle" 
width="30" height="30" alt="1">' \
                        '<img src="/htdig/button2.gif" border="0" align="middle" 
width="30" height="30" alt="2">' \
                        '<img src="/htdig/button3.gif" border="0" align="middle" 
width="30" height="30" alt="3">' \
                        '<img src="/htdig/button4.gif" border="0" align="middle" 
width="30" height="30" alt="4">' \
                        '<img src="/htdig/button5.gif" border="0" align="middle" 
width="30" height="30" alt="5">' \
                        '<img src="/htdig/button6.gif" border="0" align="middle" 
width="30" height="30" alt="6">' \
                        '<img src="/htdig/button7.gif" border="0" align="middle" 
width="30" height="30" alt="7">' \
                        '<img src="/htdig/button8.gif" border="0" align="middle" 
width="30" height="30" alt="8">' \
                        '<img src="/htdig/button9.gif" border="0" align="middle" 
width="30" height="30" alt="9">' \
                        '<img src="/htdig/button10.gif" border="0" align="middle" 
width="30" height="30" alt="10">'
#
# To make the current page stand out, we will put a border around the
# image for that page.
#
no_page_number_text:    '<img src="/htdig/button1.gif" border="2" align="middle" 
width="30" height="30" alt="1">' \
                        '<img src="/htdig/button2.gif" border="2" align="middle" 
width="30" height="30" alt="2">' \
                        '<img src="/htdig/button3.gif" border="2" align="middle" 
width="30" height="30" alt="3">' \
                        '<img src="/htdig/button4.gif" border="2" align="middle" 
width="30" height="30" alt="4">' \
                        '<img src="/htdig/button5.gif" border="2" align="middle" 
width="30" height="30" alt="5">' \
                        '<img src="/htdig/button6.gif" border="2" align="middle" 
width="30" height="30" alt="6">' \
                        '<img src="/htdig/button7.gif" border="2" align="middle" 
width="30" height="30" alt="7">' \
                        '<img src="/htdig/button8.gif" border="2" align="middle" 
width="30" height="30" alt="8">' \
                        '<img src="/htdig/button9.gif" border="2" align="middle" 
width="30" height="30" alt="9">' \
                        '<img src="/htdig/button10.gif" border="2" align="middle" 
width="30" height="30" alt="10">'

# local variables:
# mode: text
# eval: (if (eq window-system 'x) (progn (setq font-lock-keywords (list '("^#.*" . 
font-lock-keyword-face) '("^[a-zA-Z][^ :]+" . font-lock-function-name-face) '("[+$]*:" 
. font-lock-comment-face) )) (font-lock-mode)))
# end:


================================
> According to [EMAIL PROTECTED]:
> Well, I plan to completley remove htDig and start from scratch!
> 
> But, am I right in thinking that the only reason to re-compile and
> re-install htDig (for the second+ time) is to change the location of
> installed files ?
> 
> Which is not really a problem anyway, since you can phyiscally move
> config/common/search files & directories anyway ?
>
>Yes, you can simply move your config and common files to other
>directories, and change paths like common_dir and database_dir in your
>config files, without having to reconfigure/recompile/reinstall the
>ht://Dig binaries.  However, the default config file path is compiled-in,
>so you'll need to specify the alternate config file name using the -c
>option.  This works fine for everything except htsearch, which looks
>for the config file name specified by the "config" input parameter,
>in the configuration directory whose path is compiled-in.
>
>See <a Target='_new' Href='<a Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.32''>http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.32'</a>><a
> Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.32'>http://www.htdig.org/FAQ.html#5.32</a></a>,
>    <a Target='_new' Href='<a Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.30''>http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.30'</a>><a
> Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#5.30'>http://www.htdig.org/FAQ.html#5.30</a></a>,
>and <a Target='_new' Href='<a Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#4.20''>http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#4.20'</a>><a
> Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://www.htdig.org/FAQ.html#4.20'>http://www.htdig.org/FAQ.html#4.20</a></a>
> for more details about all this.
>(4.2 and 4.4 may also have some useful tips for you.)
>
>However, based on what you described earlier, it sounds to me like you've
>already tried two separate installations of ht://Dig, and that htsearch
>is not using the same database_dir (or perhaps not the same CONFIG_DIR)
>as the other programs (htdig, htmerge, etc.)  It may be that what's
>happening is that you're still running the htsearch program from your
>first installation, along with its config file and databases, instead
>of using the htsearch binary, config file(s) and databases from your
>second attempt.  Try a "locate htsearch" to see if you have more than
>one htsearch binary.  Also, try running htsearch from the command line,
>as Douglas suggested.  If you get different results from htsearch on
>the command line than you do from the web server, chances are it's a
>different htsearch binary or a different config file that is being used.
>
>-- 
>Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
>Spinal Cord Research Centre       WWW:    <a Target='_new' Href='<a Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://talk21.btopenworld.com/redirect.html?http://www.scrc.umanitoba.ca/''>http://talk21.btopenworld.com/redirect.html?http://www.scrc.umanitoba.ca/'</a>><a
> Target='_new' 
>Href='http://talk21.btopenworld.com/redirect.html?http://www.scrc.umanitoba.ca/'>http://www.scrc.umanitoba.ca/</a></a>
>Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)



--------------------
talk21 your FREE portable and private address on the net at http://www.talk21.com




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to