| 4 |
- |
1 |
#
|
|
|
2 |
# Example config file for ht://Dig.
|
|
|
3 |
#
|
|
|
4 |
# This configuration file is used by all the programs that make up ht://Dig.
|
|
|
5 |
# Please refer to the attribute reference manual for more details on what
|
|
|
6 |
# can be put into this file. (http://www.htdig.org/confindex.html)
|
|
|
7 |
# Note that most attributes have very reasonable default values so you
|
|
|
8 |
# really only have to add attributes here if you want to change the defaults.
|
|
|
9 |
#
|
|
|
10 |
# What follows are some of the common attributes you might want to change.
|
|
|
11 |
#
|
|
|
12 |
|
|
|
13 |
#
|
|
|
14 |
# Specify where the database files need to go. Make sure that there is
|
|
|
15 |
# plenty of free disk space available for the databases. They can get
|
|
|
16 |
# pretty big.
|
|
|
17 |
#
|
|
|
18 |
database_dir: /var/lib/htdig
|
|
|
19 |
|
|
|
20 |
#
|
|
|
21 |
# Define common_dir, which is used in several of the examples.
|
|
|
22 |
#
|
|
|
23 |
common_dir: /var/www/html/htdig
|
|
|
24 |
|
|
|
25 |
#
|
|
|
26 |
# Disable the translation of the ISO Latin 1 SGML entities from the
|
|
|
27 |
# documents into upper end 8-bit characters in the database,
|
|
|
28 |
# and then back to the Latin 1 SGML entities in htsearch results.
|
|
|
29 |
#
|
|
|
30 |
translate_latin1: false
|
|
|
31 |
|
|
|
32 |
#
|
|
|
33 |
# This specifies the URL where the robot (htdig) will start. You can specify
|
|
|
34 |
# multiple URLs here. Just separate them by some whitespace.
|
|
|
35 |
# The example here will cause the ht://Dig homepage and related pages to be
|
|
|
36 |
# indexed.
|
|
|
37 |
# You could also index all the URLs in a file like so:
|
|
|
38 |
# start_url: `${common_dir}/start.url`
|
|
|
39 |
#
|
|
|
40 |
start_url: http://localhost
|
|
|
41 |
|
|
|
42 |
#
|
|
|
43 |
# This attribute limits the scope of the indexing process. The default is to
|
|
|
44 |
# set it to the same as the start_url above. This way only pages that are on
|
|
|
45 |
# the sites specified in the start_url attribute will be indexed and it will
|
|
|
46 |
# reject any URLs that go outside of those sites.
|
|
|
47 |
#
|
|
|
48 |
# Keep in mind that the value for this attribute is just a list of string
|
|
|
49 |
# patterns. As long as URLs contain at least one of the patterns it will be
|
|
|
50 |
# seen as part of the scope of the index.
|
|
|
51 |
#
|
|
|
52 |
limit_urls_to: ${start_url}
|
|
|
53 |
|
|
|
54 |
#
|
|
|
55 |
# This attribute is used for compressing the database. The default is to
|
|
|
56 |
# set it to the same as the limit_urls_to above, plus some common endings.
|
|
|
57 |
#
|
|
|
58 |
# Keep in mind that this list should be short. If your start_url is a very
|
|
|
59 |
# long list of URLs, it may be wise to replace it with something like
|
|
|
60 |
# http://www. or comment this out and use the compiled-in default.
|
|
|
61 |
#
|
|
|
62 |
common_url_parts: ${limit_urls_to} .html .htm .shtml
|
|
|
63 |
|
|
|
64 |
#
|
|
|
65 |
# If there are particular pages that you definitely do NOT want to index, you
|
|
|
66 |
# can use the exclude_urls attribute. The value is a list of string patterns.
|
|
|
67 |
# If a URL matches any of the patterns, it will NOT be indexed. This is
|
|
|
68 |
# useful to exclude things like virtual web trees or database accesses. By
|
|
|
69 |
# default, all CGI URLs will be excluded. (Note that the /cgi-bin/ convention
|
|
|
70 |
# may not work on your web server. Check the path prefix used on your web
|
|
|
71 |
# server.)
|
|
|
72 |
#
|
|
|
73 |
exclude_urls: /cgi-bin/ .cgi
|
|
|
74 |
|
|
|
75 |
#
|
|
|
76 |
# Since ht://Dig does not (and cannot) parse every document type, this
|
|
|
77 |
# attribute is a list of strings (extensions) that will be ignored during
|
|
|
78 |
# indexing. These are *only* checked at the end of a URL, whereas
|
|
|
79 |
# exclude_url patterns are matched anywhere.
|
|
|
80 |
#
|
|
|
81 |
# Also keep in mind that while other attributes allow regex, these must be
|
|
|
82 |
# actual strings.
|
|
|
83 |
#
|
|
|
84 |
bad_extensions: .wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
|
|
|
85 |
.jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi .css
|
|
|
86 |
|
|
|
87 |
#
|
|
|
88 |
# The string htdig will send in every request to identify the robot. Change
|
|
|
89 |
# this to your email address.
|
|
|
90 |
#
|
|
|
91 |
maintainer: root@localhost
|
|
|
92 |
|
|
|
93 |
#
|
|
|
94 |
# The excerpts that are displayed in long results rely on stored information
|
|
|
95 |
# in the index databases. The compiled default only stores 512 characters of
|
|
|
96 |
# text from each document (this excludes any HTML markup...) If you plan on
|
|
|
97 |
# using the excerpts you probably want to make this larger. The only concern
|
|
|
98 |
# here is that more disk space is going to be needed to store the additional
|
|
|
99 |
# information. Since disk space is cheap (! :-)) you might want to set this
|
|
|
100 |
# to a value so that a large percentage of the documents that you are going
|
|
|
101 |
# to be indexing are stored completely in the database. At SDSU we found
|
|
|
102 |
# that by setting this value to about 50k the index would get 97% of all
|
|
|
103 |
# documents completely and only 3% was cut off at 50k. You probably want to
|
|
|
104 |
# experiment with this value.
|
|
|
105 |
# Note that if you want to set this value low, you probably want to set the
|
|
|
106 |
# excerpt_show_top attribute to false so that the top excerpt_length characters
|
|
|
107 |
# of the document are always shown.
|
|
|
108 |
#
|
|
|
109 |
max_head_length: 10000
|
|
|
110 |
|
|
|
111 |
#
|
|
|
112 |
# To limit network connections, ht://Dig will only pull up to a certain limit
|
|
|
113 |
# of bytes. This prevents the indexing from dying because the server keeps
|
|
|
114 |
# sending information. However, several FAQs happen because people have files
|
|
|
115 |
# bigger than the default limit of 100KB. This sets the default a bit higher.
|
|
|
116 |
# (see <http://www.htdig.org/FAQ.html> for more)
|
|
|
117 |
#
|
|
|
118 |
max_doc_size: 200000
|
|
|
119 |
|
|
|
120 |
#
|
|
|
121 |
# Most people expect some sort of excerpt in results. By default, if the
|
|
|
122 |
# search words aren't found in context in the stored excerpt, htsearch shows
|
|
|
123 |
# the text defined in the no_excerpt_text attribute:
|
|
|
124 |
# (None of the search words were found in the top of this document.)
|
|
|
125 |
# This attribute instead will show the top of the excerpt.
|
|
|
126 |
#
|
|
|
127 |
no_excerpt_show_top: true
|
|
|
128 |
|
|
|
129 |
#
|
|
|
130 |
# Depending on your needs, you might want to enable some of the fuzzy search
|
|
|
131 |
# algorithms. There are several to choose from and you can use them in any
|
|
|
132 |
# combination you feel comfortable with. Each algorithm will get a weight
|
|
|
133 |
# assigned to it so that in combinations of algorithms, certain algorithms get
|
|
|
134 |
# preference over others. Note that the weights only affect the ranking of
|
|
|
135 |
# the results, not the actual searching.
|
|
|
136 |
# The available algorithms are:
|
|
|
137 |
# accents
|
|
|
138 |
# exact
|
|
|
139 |
# endings
|
|
|
140 |
# metaphone
|
|
|
141 |
# prefix
|
|
|
142 |
# regex
|
|
|
143 |
# soundex
|
|
|
144 |
# speling [sic]
|
|
|
145 |
# substring
|
|
|
146 |
# synonyms
|
|
|
147 |
# By default only the "exact" algorithm is used with weight 1.
|
|
|
148 |
# Note that if you are going to use the endings, metaphone, soundex, accents,
|
|
|
149 |
# or synonyms algorithms, you will need to run htfuzzy to generate
|
|
|
150 |
# the databases they use.
|
|
|
151 |
#
|
|
|
152 |
search_algorithm: exact:1 synonyms:0.5 endings:0.1
|
|
|
153 |
|
|
|
154 |
#
|
|
|
155 |
# The following are the templates used in the builtin search results
|
|
|
156 |
# The default is to use compiled versions of these files, which produces
|
|
|
157 |
# slightly faster results. However, uncommenting these lines makes it
|
|
|
158 |
# very easy to change the format of search results.
|
|
|
159 |
# See <http://www.htdig.org/hts_templates.html> for more details.
|
|
|
160 |
#
|
|
|
161 |
# template_map: Long long ${common_dir}/long.html \
|
|
|
162 |
# Short short ${common_dir}/short.html
|
|
|
163 |
# template_name: long
|
|
|
164 |
|
|
|
165 |
#
|
|
|
166 |
# The following are used to change the text for the page index.
|
|
|
167 |
# The defaults are just boring text numbers. These images spice
|
|
|
168 |
# up the result pages quite a bit. (Feel free to do whatever, though)
|
|
|
169 |
#
|
|
|
170 |
next_page_text: <img src="/htdig/buttonr.gif" border="0" align="middle" width="30" height="30" alt="next">
|
|
|
171 |
no_next_page_text:
|
|
|
172 |
prev_page_text: <img src="/htdig/buttonl.gif" border="0" align="middle" width="30" height="30" alt="prev">
|
|
|
173 |
no_prev_page_text:
|
|
|
174 |
page_number_text: '<img src="/htdig/button1.gif" border="0" align="middle" width="30" height="30" alt="1">' \
|
|
|
175 |
'<img src="/htdig/button2.gif" border="0" align="middle" width="30" height="30" alt="2">' \
|
|
|
176 |
'<img src="/htdig/button3.gif" border="0" align="middle" width="30" height="30" alt="3">' \
|
|
|
177 |
'<img src="/htdig/button4.gif" border="0" align="middle" width="30" height="30" alt="4">' \
|
|
|
178 |
'<img src="/htdig/button5.gif" border="0" align="middle" width="30" height="30" alt="5">' \
|
|
|
179 |
'<img src="/htdig/button6.gif" border="0" align="middle" width="30" height="30" alt="6">' \
|
|
|
180 |
'<img src="/htdig/button7.gif" border="0" align="middle" width="30" height="30" alt="7">' \
|
|
|
181 |
'<img src="/htdig/button8.gif" border="0" align="middle" width="30" height="30" alt="8">' \
|
|
|
182 |
'<img src="/htdig/button9.gif" border="0" align="middle" width="30" height="30" alt="9">' \
|
|
|
183 |
'<img src="/htdig/button10.gif" border="0" align="middle" width="30" height="30" alt="10">'
|
|
|
184 |
#
|
|
|
185 |
# To make the current page stand out, we will put a border around the
|
|
|
186 |
# image for that page.
|
|
|
187 |
#
|
|
|
188 |
no_page_number_text: '<img src="/htdig/button1.gif" border="2" align="middle" width="30" height="30" alt="1">' \
|
|
|
189 |
'<img src="/htdig/button2.gif" border="2" align="middle" width="30" height="30" alt="2">' \
|
|
|
190 |
'<img src="/htdig/button3.gif" border="2" align="middle" width="30" height="30" alt="3">' \
|
|
|
191 |
'<img src="/htdig/button4.gif" border="2" align="middle" width="30" height="30" alt="4">' \
|
|
|
192 |
'<img src="/htdig/button5.gif" border="2" align="middle" width="30" height="30" alt="5">' \
|
|
|
193 |
'<img src="/htdig/button6.gif" border="2" align="middle" width="30" height="30" alt="6">' \
|
|
|
194 |
'<img src="/htdig/button7.gif" border="2" align="middle" width="30" height="30" alt="7">' \
|
|
|
195 |
'<img src="/htdig/button8.gif" border="2" align="middle" width="30" height="30" alt="8">' \
|
|
|
196 |
'<img src="/htdig/button9.gif" border="2" align="middle" width="30" height="30" alt="9">' \
|
|
|
197 |
'<img src="/htdig/button10.gif" border="2" align="middle" width="30" height="30" alt="10">'
|
|
|
198 |
|
|
|
199 |
# local variables:
|
|
|
200 |
# mode: text
|
|
|
201 |
# 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)))
|
|
|
202 |
# end:
|