|
Regain 1.7.7-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 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.
| Field Summary | |
|---|---|
private String |
mFieldName
The name of the auxiliary field. |
private boolean |
mIndex
Specifies whether the field value should be indexed. |
private boolean |
mStore
Specifies whether the field value should be stored in the index. |
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 org.apache.regexp.RE |
mUrlRegex
The regex that extracts the value of the field. |
private int |
mUrlRegexGroup
The group of the regex that contains the value. |
private String |
mValue
The value of the auxiliary field. |
| Constructor Summary | |
|---|---|
AuxiliaryField(String fieldName,
String value,
boolean toLowerCase,
org.apache.regexp.RE urlRegex,
int urlRegexGroup,
boolean store,
boolean index,
boolean tokenize)
Creates a new instance of AuxiliaryField. |
|
| Method Summary | |
|---|---|
String |
getFieldName()
Gets the name of the auxiliary field. |
boolean |
getToLowerCase()
Returns whether the (extracted) value should be converted to lower case. |
org.apache.regexp.RE |
getUrlRegex()
Gets the regex that extracts the value of the field. |
int |
getUrlRegexGroup()
Gets the group of the regex that contains the value. |
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 String mFieldName
private String mValue
private boolean mToLowerCase
private org.apache.regexp.RE mUrlRegex
private int mUrlRegexGroup
private boolean mStore
private boolean mIndex
private boolean mTokenize
| Constructor Detail |
|---|
public AuxiliaryField(String fieldName,
String value,
boolean toLowerCase,
org.apache.regexp.RE urlRegex,
int urlRegexGroup,
boolean store,
boolean index,
boolean tokenize)
throws RegainException
fieldName - 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.urlRegex - The regex that extracts the value of the field.urlRegexGroup - 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 String getFieldName()
public String getValue()
If null, the value will be extracted from the regex using the urlRegexGroup.
public boolean getToLowerCase()
public org.apache.regexp.RE getUrlRegex()
public int getUrlRegexGroup()
public boolean isStored()
public boolean isIndexed()
public boolean isTokenized()
|
Regain 1.7.7-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||