4.6. Body patterns

If you need index not whole page, for example, to exclude navigation, ads, etc., you may use BodyPattern command to specify a pattern to extract content of a page for indexing. For example:

BodyPattern "<!--content-->(.*)<!--/content-->" "$1"
this pattern will extract content between special comments and only that content will be indexed for this page.

You may specify several BodyPattern commands, but only the first match will be applied to a page. These patterns are trying to apply to all pages indexed. Beware, huge number of such body patterns may hurt indexing speed.

The BodyBrackets command is similar to BodyPattern command, but it defines two markers: beginning of the body and ending of the body, e.g.

BodyBrackets "<!--B-->" "<!--E-->"
Then fragment of the document enclosed between <!--B--> and <!--E--> is treated as document body.



Geo Visitors Map who's online