| java.lang.Object net.sf.regain.crawler.config.AuxiliaryField
AuxiliaryField | public class AuxiliaryField (Code) | | An auxiliary field is a additional field put into the index.
Example: If you have a directory with a sub directory for every project,
then you may create a field with the project's name.
The folling rule will create a field "project" with the value "otto23"
from the URL "file://c:/projects/otto23/docs/Spez.doc":
new AuxiliaryField("project", "^file://c:/projects/([^/]*)", 1)
URLs that doen't match will get no "project" field.
Having done this you may search for "Offer project:otto23" and you will get
only hits from this project directory.
author: Tilman Schneider, STZ-IDA an der FH Karlsruhe |
Constructor Summary | |
public | AuxiliaryField(String fieldName, String value, boolean toLowerCase, RE urlRegex, int urlRegexGroup, boolean store, boolean index, boolean tokenize) Creates a new instance of AuxiliaryField.
Parameters: fieldName - The name of the auxiliary field. Parameters: value - The value of the auxiliary field. |
Method Summary | |
public String | getFieldName() Gets the name of the auxiliary field. | public boolean | getToLowerCase() Returns whether the (extracted) value should be converted to lower case.
Whether the (extracted) value should be converted to lower case. | public RE | getUrlRegex() Gets the regex that extracts the value of the field. | public int | getUrlRegexGroup() Gets the group of the regex that contains the value. | public String | getValue() Returns the value of the auxiliary field. | public boolean | isIndexed() Returns whether the field value should be indexed. | public boolean | isStored() Returns whether the field value should be stored in the index. | public boolean | isTokenized() Returns whether the field value should be tokenized. |
AuxiliaryField | public AuxiliaryField(String fieldName, String value, boolean toLowerCase, RE urlRegex, int urlRegexGroup, boolean store, boolean index, boolean tokenize) throws RegainException(Code) | | Creates a new instance of AuxiliaryField.
Parameters: fieldName - The name of the auxiliary field. Parameters: value - The value of the auxiliary field. If null, the value will beextracted from the regex using the urlRegexGroup. Parameters: toLowerCase - Whether the (extracted) value should be converted tolower case. Parameters: urlRegex - The regex that extracts the value of the field. Parameters: urlRegexGroup - The group of the regex that contains the value. Parameters: store - Specifies whether the field value should be stored in theindex. Parameters: index - Specifies whether the field value should be indexed. Parameters: tokenize - Specifies whether the field value should be tokenized. throws: RegainException - If the regex has a syntax error. |
getFieldName | public String getFieldName()(Code) | | Gets the name of the auxiliary field.
The name of the auxiliary field. |
getToLowerCase | public boolean getToLowerCase()(Code) | | Returns whether the (extracted) value should be converted to lower case.
Whether the (extracted) value should be converted to lower case. |
getUrlRegex | public RE getUrlRegex()(Code) | | Gets the regex that extracts the value of the field.
The regex that extracts the value of the field. |
getUrlRegexGroup | public int getUrlRegexGroup()(Code) | | Gets the group of the regex that contains the value.
The group of the regex that contains the value. |
getValue | public String getValue()(Code) | | Returns the value of the auxiliary field.
If null, the value will be extracted from the regex using the urlRegexGroup.
The value of the auxiliary field. |
isIndexed | public boolean isIndexed()(Code) | | Returns whether the field value should be indexed.
whether the field value should be indexed. |
isStored | public boolean isStored()(Code) | | Returns whether the field value should be stored in the index.
whether the field value should be stored in the index. |
isTokenized | public boolean isTokenized()(Code) | | Returns whether the field value should be tokenized.
whether the field value should be tokenized. |
|
|