|
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.search.config.IndexConfig
public class IndexConfig
The configuration for one index.
Field Summary | |
---|---|
protected static String[] |
DEFAULT_SEARCH_FIELD_LIST
Default list of index fields to search in. |
private String |
mDirectory
The directory where the index is located. |
private boolean |
mHasParent
Index has a parent |
private String |
mName
The name of the index. |
private String |
mOpenInNewWindowRegex
The regular expression that identifies URLs that should be opened in a new window. |
private boolean |
mParent
Index is used as parent cover |
private String |
mParentName
Name of the parent (only used if mHasParent is true) |
private String[][] |
mRewriteRules
The URL rewrite rules. |
private SearchAccessController |
mSearchAccessController
The SearchAccessController to use. |
private String[] |
mSearchFieldList
The index fields to search by default. |
private boolean |
mShouldHighlight
Flag for highlighting of the search terms in the results |
private boolean |
mShowSortFieldContent
|
private SortingOption[] |
mSortingOptions
The sorting options for the results. |
private boolean |
mUseFileToHttpBridge
Whether the file-to-http-bridge should be used. |
Constructor Summary | |
---|---|
IndexConfig(String name,
String directory,
String openInNewWindowRegex,
boolean useFileToHttpBridge,
String[] searchFieldList,
String[][] rewriteRules,
String searchAccessControllerClass,
String searchAccessControllerJar,
Properties searchAccessControllerConfig,
boolean shouldHighlight,
SortingOption[] sortingOptions,
boolean showSortFieldContent)
Creates a new instance of IndexConfig. |
Method Summary | |
---|---|
String |
getDirectory()
Gets the directory where the index is located. |
String |
getName()
Gets the name of the index. |
String |
getOpenInNewWindowRegex()
Gets the regular expression that identifies URLs that should be opened in a new window. |
String |
getParentName()
Gets the name of the parent index. |
String[][] |
getRewriteRules()
Gets the URL rewrite rules. |
SearchAccessController |
getSearchAccessController()
Gets the SearchAccessController to use. |
String[] |
getSearchFieldList()
Gets the index fields to search by default. |
boolean |
getShouldHighlight()
Gets the flag for highlighting of the search terms |
boolean |
getShowSortFieldContent()
|
SortingOption[] |
getSortingOptions()
|
boolean |
getUseFileToHttpBridge()
Gets whether the file-to-http-bridge should be used for file-URLs. |
boolean |
hasParent()
Is index has a parent index? |
boolean |
isParent()
Is index a child of a parent index? |
void |
setParent(String parent)
Set index as parent if parent is "true" otherwise set false |
void |
setParentName(String parentName)
Set the name of the parent index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String[] DEFAULT_SEARCH_FIELD_LIST
private String mName
private String mDirectory
private String mOpenInNewWindowRegex
private boolean mUseFileToHttpBridge
private String[] mSearchFieldList
NOTE: The user may search in other fields also using the "field:"-operator. Read the lucene query syntax for details.
private String[][] mRewriteRules
Contains pairs of URL prefixes: The first prefix will be replaced by the second.
E.g.:
new String[][] { { "file://c:/webcontent", "http://www.mydomain.de" }, { "file://n:/docs", "file://///fileserver/public/docs" }, };
private SearchAccessController mSearchAccessController
null
.
private boolean mShouldHighlight
private boolean mParent
private boolean mHasParent
private String mParentName
private SortingOption[] mSortingOptions
private boolean mShowSortFieldContent
Constructor Detail |
---|
public IndexConfig(String name, String directory, String openInNewWindowRegex, boolean useFileToHttpBridge, String[] searchFieldList, String[][] rewriteRules, String searchAccessControllerClass, String searchAccessControllerJar, Properties searchAccessControllerConfig, boolean shouldHighlight, SortingOption[] sortingOptions, boolean showSortFieldContent) throws RegainException
name
- The name of the index.directory
- The directory where the index is located.openInNewWindowRegex
- The regular expression that identifies URLs
that should be opened in a new window.useFileToHttpBridge
- Whether the file-to-http-bridge should be used.
See getUseFileToHttpBridge()
for details.searchFieldList
- The index fields to search by default.rewriteRules
- The URL rewrite rules. Contains pairs of URL prefixes:
The first prefix will be replaced by the second.searchAccessControllerClass
- The class name of the
SearchAccessController
to use.searchAccessControllerJar
- The name of jar file to load the
SearchAccessController
from.searchAccessControllerConfig
- The configuration for the
SearchAccessController
.shouldHighlight
- The flag for highlighting of the search terms in the results
RegainException
- If loading the SearchAccessController failed.Method Detail |
---|
public String getName()
public String getDirectory()
public String getOpenInNewWindowRegex()
public boolean getUseFileToHttpBridge()
Mozilla browsers have a security mechanism that blocks loading file-URLs from pages loaded via http. To be able to load files from the search results, regain offers the file-to-http-bridge that provides all files that are listed in the index via http.
public String[] getSearchFieldList()
NOTE: The user may search in other fields also using the "field:"-operator. Read the lucene query syntax for details.
public String[][] getRewriteRules()
The returned array contains pairs of URL prefixes: The first prefix will be replaced by the second.
E.g.:
new String[][] { { "file://c:/webcontent", "http://www.mydomain.de" }, { "file://n:/docs", "file://///fileserver/public/docs" }, };
public SearchAccessController getSearchAccessController()
null
if no
SearchAccessController should be used.
public boolean getShouldHighlight()
public boolean hasParent()
public boolean isParent()
public void setParent(String parent)
parent
- is index a parent index?public String getParentName()
public void setParentName(String parentName)
parentName
- Name of the parent indexpublic SortingOption[] getSortingOptions()
public boolean getShowSortFieldContent()
|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |