To define a scope
means to specify a more precise location of a document or to restrict
the search query to a particular range. Url scoping is particularly useful as Alkaline is capable of
indexing multiple sites with the same daemon.
Host scope is specified by adding the rightmost part of a host entry,
such as host:.host.com
to the search query.
For example, to search foo
in documents at http://www.foo.com, the following command should
be issued: foo host:.foo.com
. It is possible to specify multiple hosts by writing
more than one host:
elements in your search string.
For example: host:.bar.com host:.foo.com +foo -bar
will return all documents indexed at
*.foo.com, *.bar.com containing "foo" and not containing "bar".
Path scope is specified by adding the leftmost part of a path without the leading slash,
such as path:foo/bar
to the search string. For example, to search
foo
in documents at http://www.foo.com/foo/bar, the following command should be issued:
host:www.foo.com path:foo/bar foo
.
|
It is possible to mix host:
and path:
as it is possible to specify
multiple path entries.
|
Url scope is specified by adding the leftmost part of a complete url, including the leading http://
,
such as url:http://www.foo.com/bar
or url:file:///foo/bar
to the search string.
If you choose to omit the protocol, http:// is assumed. For example, to search foo
in documents
at http://www.foo.com/bar, the following command should be issued: url:www.foo.com/bar foo
.
To specify a scope to urls with spaces and other special characters, use the encoded url value, such
as url:www.foo.com/foo%20bar
.
File extension scope is specified by adding the rightmost part of a filename without the leading dot,
such as ext:cpp,h
to the search string. Multiple extensions can either be specified separated by
commas or by adding more than one ext:
parameter to the search string.
For example to search foo
in all .bar
documents, the following command
should be issued: ext:bar foo
.
Alkaline will return documents matching the search query and any
of the host:, path: or url: scope options
and
the ext: scope delimiter, if present. As usual if no scope is specified, the entire indexed domain
is searched. It is possible to specify multiple values in all scope delimiters by separating them with commas or by adding
multiple scope options to the search string.
Meta scoping is specified by adding meta:name1[,name2]
to the search string.
Multiple meta tag names can either be separated by commas or by adding more than one
meta:
parameter to the search string. For example to search foo bar
in
all keywords only, the following command should be issued: foo bar meta:keywords
, which is
equivalent to keywords:foo keywords:bar
. Meta scoping was added in version 1.6.