|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.regain.crawler.config.AuxiliaryField
public class AuxiliaryField
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 following 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 doesn'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.
Nested Class Summary | |
---|---|
static class |
AuxiliaryField.SourceField
The source field types |
Field Summary | |
---|---|
private boolean |
mIndex
Specifies whether the field value should be indexed. |
private org.apache.regexp.RE |
mRegex
The regex that extracts the value of the field. |
private int |
mRegexGroup
The group of the regex that contains the value. |
private AuxiliaryField.SourceField |
mSourceField
The source field on which to apply the regex. |
private boolean |
mStore
Specifies whether the field value should be stored in the index. |
private String |
mTargetFieldName
The name of the auxiliary field to create. |
private boolean |
mTokenize
Specifies whether the field value should be tokenized. |
private boolean |
mToLowerCase
Specifies whether the (extracted) value should be converted to lower case. |
private String |
mValue
The value of the auxiliary field. |
Constructor Summary | |
---|---|
AuxiliaryField(AuxiliaryField.SourceField sourceField,
String targetFieldName,
String value,
boolean toLowerCase,
org.apache.regexp.RE regex,
int regexGroup,
boolean store,
boolean index,
boolean tokenize)
Creates a new instance of AuxiliaryField. |
Method Summary | |
---|---|
org.apache.regexp.RE |
getRegex()
Gets the regex that extracts the value of the field. |
int |
getRegexGroup()
Gets the group of the regex that contains the value. |
AuxiliaryField.SourceField |
getSourceField()
Returns the source field on which to apply the regex. |
String |
getTargetFieldName()
Gets the name of the auxiliary field to create. |
boolean |
getToLowerCase()
Returns whether the (extracted) value should be converted to lower case. |
String |
getValue()
Returns the value of the auxiliary field. |
boolean |
isIndexed()
Returns whether the field value should be indexed. |
boolean |
isStored()
Returns whether the field value should be stored in the index. |
boolean |
isTokenized()
Returns whether the field value should be tokenized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private AuxiliaryField.SourceField mSourceField
private String mTargetFieldName
private String mValue
private boolean mToLowerCase
private org.apache.regexp.RE mRegex
private int mRegexGroup
private boolean mStore
private boolean mIndex
private boolean mTokenize
Constructor Detail |
---|
public AuxiliaryField(AuxiliaryField.SourceField sourceField, String targetFieldName, String value, boolean toLowerCase, org.apache.regexp.RE regex, int regexGroup, boolean store, boolean index, boolean tokenize) throws RegainException
sourceField
- The source field on which to apply the regex.targetFieldName
- The name of the auxiliary field.value
- The value of the auxiliary field. If null, the value will be
extracted from the regex using the urlRegexGroup.toLowerCase
- Whether the (extracted) value should be converted to
lower case.regex
- The regex that extracts the value of the field.regexGroup
- The group of the regex that contains the value.store
- Specifies whether the field value should be stored in the
index.index
- Specifies whether the field value should be indexed.tokenize
- Specifies whether the field value should be tokenized.
RegainException
- If the regex has a syntax error.Method Detail |
---|
public AuxiliaryField.SourceField getSourceField()
public String getTargetFieldName()
public String getValue()
If null, the value will be extracted from the regex using the urlRegexGroup.
public boolean getToLowerCase()
public org.apache.regexp.RE getRegex()
public int getRegexGroup()
public boolean isStored()
public boolean isIndexed()
public boolean isTokenized()
|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |