View on
MetaCPAN
Barry King > Apache-Wyrd > Apache::Wyrd::Interfaces::Indexable

Download:
Apache-Wyrd-0.98.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.98   Source  

NAME ^

Apache::Wyrd::Interfaces::Indexable - Pass metadata to Wyrd Index service

SYNOPSIS ^

NONE

DESCRIPTION ^

Indexable provides the minimum methods required by an object to be indexed using the Apache::Wyrd::Services::Index object. An indexable object can be inserted into the index via the update_entry method of the index.

HTML ATTRIBUTES ^

name

keyword_weight

How much more, relative to an instance of the word in the body (_data), a keyword is worth. Defaults to 5.

PERL METHODS ^

(format: (returns) name (arguments after self))

(scalar) no_index (void)

Returns true if the item should not be indexed. Traditionally supplied via the noindex flag attribute of a Wyrd.

(scalar) force_update (void)

Tells the index to ignore timestamp and digest arguments, and always update the entry for this object even if there is no apparent change. This may be helpful in debugging index problems.

(scalar) index_foo (void)

Where foo is at a minimum of name, timestamp, digest, data, title, keywords, and description. Any attributes specified in the attributes option of the Apache::Wyrd::Services::Index object will also need to be implemented in an indexable object. If the attribute is a map, it needs only to return a string of tokens separated by whitespace, punctuation optional.

Because the assumption is that the indexable item will probably be a web page, the path to the file from the server root is the traditional "name" of the item. As such, when the results of a search are returned by the Index, the href attribute of a link to the page is created from the name attribute.

Also in this tradition, the default map for searching uses the tokens provided by index_data as the basis for the index' word_search.

AUTHOR ^

Barry King <wyrd@nospam.wyrdwright.com>

SEE ALSO ^

Apache::Wyrd

General-purpose HTML-embeddable perl object

Apache::Wyrd::Services::Index
Apache::Wyrd::Services::MySQLIndex
Apache::Wyrd::Site::Index
Apache::Wyrd::Site::MySQLIndex

Various index objects for site organization.

LICENSE ^

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for Apache::Wyrd.

syntax highlighting: