|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.SearchSource
com.raritantechnologies.searchApp.sourceMap.LookupSearchSource
Provides a lookup service enabling search inputs to a search source to be
expanded by an "input" search source prior to executing the search on the output or
"target" SearchSource.
Can be used for:
Depending on how the LookupSearchSource is used, configurable options for copying parameters and result values, paging settings, etc. must be properly chosen.
<SourceType name="[ search source name ]"
type="LookupSearchSource"
displayName="[ human readable name ]"
sourceFactoryClass="com.raritantechnologies.searchApp.sourceMap.LookupSearchSourceFactory"
queryProcessor="com.raritantechnologies.searchApp.sourceMap.LookupQueryProcessor"
addAllRequestParams="true(default)|false - if false don't add all initial query parameters to secondary search"
addAllInputResults="[true|false(default) - set to 'true' for metadata field enhancement ]"
excludeOutputHits="[true|false(default) - set to 'true' for metadata field enhancement ]"
addAllInputFields="true|false - if true add input result metadata to output result"
nestedResultField="[ field name to use to add the entire input result as a nested result ]"
inputSourcePaging="true|false(default)"
outputSourcePaging="true(default)|false"
inputPageSize="[ page size of input result set ]"
outputPageSize="[ page size of output result set ]" >
<!-- =================================================================== -->
<!-- Fields section defines how the results of the first query processor -->
<!-- are to be used to generate a query to the second query processor -->
<!-- and to define fields that are to be combined in the final output. -->
<!-- -->
<!-- AddToQuery Fields: These are parameters that are to be copied from -->
<!-- the initial result to the query used for the second order search. -->
<!-- -->
<!-- AddToOutput Fields: These are parameters that are to be copied -->
<!-- from the initial result to the final output result. -->
<!-- =================================================================== -->
<Fields>
<AddToQuery ID="[ input result field ID ]" required="true" />
<AddToQuery ID="[ output query param ]" value="[ its fixed value ]" />
<AddToQuery ID="[ input result field ID ]" mapTo="[ field name in output source ]" />
<AddToOutput ID="[ field ID ]" />
<AddToOutput ID="[ another field ID ]" />
<AddToOutput ID="STATIC_FIELD" value="ITS VALUE" />
</Fields>
<!-- =================================================================== -->
<!-- Defines the initial search source used. -->
<!-- =================================================================== -->
<InputSource>[ name of initial Search Source ]</InputSource>
<!-- =================================================================== -->
<!-- Optional formatting / filtering elements that can be used to modify -->
<!-- results of the initial search before using these to generate a -->
<!-- query to the second source. -->
<!-- =================================================================== -->
<InputFormatter class="[ class of com.raritantechnologies.searchApp.IFieldFormatter ]" >
<!-- configuration parameters for IFieldFormatter -->
</InputFormatter>
<!-- Filters the query map generated by the primary search prior to its -->
<!-- use in the secondary search. -->
<MapFilter class="[class of com.raritantechnologies.utils.filter.IMapFilter ]" >
<!-- configuration parameters for MapFilter -->
</MapFilter>
<!-- Filters the query map generated by the primary search prior to its -->
<!-- use in the secondary search. -->
<QueryParser class="[class of com.raritantechnologies.searchApp.IQueryParser ]" >
<!-- configuration parameters for QueryParser -->
</QueryParser>
<!-- =================================================================== -->
<!-- Defines the final or output search source use -->
<!-- =================================================================== -->
<OutputSource>[ name of second Search Source ]</OutputSource>
<!-- Alternatively - outputSource name is a field value of -->
<!-- the initial search result. -->
<OutputSource isFieldName="true">sourceFieldName</OutputSource>
</SourceType>
| Field Summary |
| Fields inherited from class com.raritantechnologies.searchApp.SearchSource |
ID_FIELD, IS_FEDERATED, NUMBER_OF_FIELDS, SECURE, SOURCE_NAME, SOURCE_TYPE, TITLE_FIELD, URL_FIELD |
| Constructor Summary | |
LookupSearchSource()
|
|
LookupSearchSource(SearchSource inputSource,
java.lang.String[] theOutputFields)
|
|
LookupSearchSource(java.lang.String inputSearchSourceName,
ISourceMap sourceMap,
java.lang.String[] theOutputFields)
|
|
LookupSearchSource(java.lang.String inputSearchSourceName,
java.lang.String[] outputSearchSourceNames,
java.lang.String[] theOutputFields)
|
|
LookupSearchSource(java.lang.String inputSearchSourceName,
java.lang.String outputSearchSourceName,
java.lang.String[] theOutputFields)
|
|
| Method Summary | |
boolean |
addAllInputFields()
|
boolean |
addAllInputResults()
|
boolean |
addAllRequestParams()
|
void |
addInputFilter(java.lang.String inputField,
IStringFilter filter)
|
void |
addRequiredProperty(java.lang.String property)
|
void |
addToInputMap(java.lang.String inputField,
java.lang.String outputField)
|
void |
addToValueMap(java.lang.String inputField,
java.lang.String value)
|
boolean |
excludeOutputHits()
|
java.util.Map |
getFixedFields()
|
java.lang.String[] |
getInputFields()
|
IStringFilter |
getInputFilter(java.lang.String inputField)
|
IFieldFormatter[] |
getInputFormatters()
|
IMapFilter |
getInputMapFilter()
|
java.lang.Integer |
getInputPageSize()
|
SearchSource |
getInputSource()
|
boolean |
getInputSourcePaging()
|
java.lang.String |
getInputValue(java.lang.String inputField)
|
java.lang.String |
getNestedResultField()
|
java.lang.String[] |
getOutputFields()
|
java.lang.Integer |
getOutputPageSize()
|
java.lang.Integer |
getOutputPageSize(int requestedPageSize)
|
SearchSource |
getOutputSource(ILoginInfo userInfo,
IResult res,
java.util.Map searchParams)
|
boolean |
getOutputSourcePaging()
|
java.lang.Object |
getProperty(java.lang.String property)
returns a Source Property. |
java.util.List |
getQueryFields()
|
IQueryParser |
getQueryParser()
|
IQueryProcessor |
getQueryProcessor()
returns the type of QueryProcessor that can access this SearchSource. |
java.lang.String[] |
getSourcePropertyNames()
Returns a list of Source type specific property names. |
boolean |
isRequired(java.lang.String property)
|
java.lang.String[] |
mapInputField(java.lang.String inputField)
|
void |
setAddAllInputFields(boolean addAllInputFields)
|
void |
setAddAllInputResults(boolean addAllInputResults)
|
void |
setAddAllRequestParams(boolean addAllRequestParams)
|
void |
setExcludeOutputHits(boolean excludeOutputHits)
|
void |
setFixedFields(java.util.Map fixedFields)
|
void |
setInputFields(java.lang.String[] inputFields)
|
void |
setInputFormatters(IFieldFormatter[] fieldFormatters)
|
void |
setInputMapFilter(IMapFilter mapFilter)
Adds an IMapFilter that can modify the query map to the secondary search source. |
void |
setInputPageSize(int inputPageSize)
|
void |
setInputSource(SearchSource inputSource)
|
void |
setInputSourcePaging(boolean inputSourcePaging)
|
void |
setNestedResultField(java.lang.String nestedResultField)
Sets the field name to use as a nested result field - use this to build composite Result objects from multiple level searches. |
void |
setOutputFields(java.lang.String[] outputFields)
|
void |
setOutputPageSize(int outputPageSize)
|
void |
setOutputSource(SearchSource outputSource)
|
void |
setOutputSourceIsField(boolean isField)
|
void |
setOutputSourceName(java.lang.String outputSourceName)
|
void |
setOutputSourcePaging(boolean outputSourcePaging)
|
void |
setOutputSources(java.lang.String[] outputSourceNames)
|
void |
setQueryFields(java.util.List queryFields)
Sets set of fields that will be passed on from query to output result. |
void |
setQueryParser(IQueryParser queryParser)
|
void |
setSourceMap(java.lang.String sourceMapType,
java.lang.String sourceMapName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LookupSearchSource()
public LookupSearchSource(SearchSource inputSource,
java.lang.String[] theOutputFields)
public LookupSearchSource(java.lang.String inputSearchSourceName,
java.lang.String outputSearchSourceName,
java.lang.String[] theOutputFields)
public LookupSearchSource(java.lang.String inputSearchSourceName,
java.lang.String[] outputSearchSourceNames,
java.lang.String[] theOutputFields)
public LookupSearchSource(java.lang.String inputSearchSourceName,
ISourceMap sourceMap,
java.lang.String[] theOutputFields)
| Method Detail |
public IQueryProcessor getQueryProcessor()
SearchSource
getQueryProcessor in class SearchSourcepublic void setInputSource(SearchSource inputSource)
public SearchSource getInputSource()
public void setOutputSource(SearchSource outputSource)
public SearchSource getOutputSource(ILoginInfo userInfo,
IResult res,
java.util.Map searchParams)
public void setOutputSourceName(java.lang.String outputSourceName)
public void setOutputSources(java.lang.String[] outputSourceNames)
public void setSourceMap(java.lang.String sourceMapType,
java.lang.String sourceMapName)
public java.lang.String[] getOutputFields()
public void setOutputFields(java.lang.String[] outputFields)
public void setInputFields(java.lang.String[] inputFields)
public java.lang.String[] getInputFields()
public void setNestedResultField(java.lang.String nestedResultField)
public java.lang.String getNestedResultField()
public void setAddAllInputResults(boolean addAllInputResults)
public boolean addAllInputResults()
public void setAddAllInputFields(boolean addAllInputFields)
public boolean addAllInputFields()
public void setAddAllRequestParams(boolean addAllRequestParams)
public boolean addAllRequestParams()
public void setExcludeOutputHits(boolean excludeOutputHits)
public boolean excludeOutputHits()
public java.lang.String[] getSourcePropertyNames()
SearchSource
getSourcePropertyNames in class SearchSourcepublic java.lang.Object getProperty(java.lang.String property)
SearchSource
getProperty in class SearchSourcepublic boolean isRequired(java.lang.String property)
public void addRequiredProperty(java.lang.String property)
public void setOutputSourceIsField(boolean isField)
public void addToInputMap(java.lang.String inputField,
java.lang.String outputField)
public java.lang.String[] mapInputField(java.lang.String inputField)
public void addInputFilter(java.lang.String inputField,
IStringFilter filter)
public IStringFilter getInputFilter(java.lang.String inputField)
public void setInputMapFilter(IMapFilter mapFilter)
public IMapFilter getInputMapFilter()
public void setQueryParser(IQueryParser queryParser)
public IQueryParser getQueryParser()
public void setInputPageSize(int inputPageSize)
public java.lang.Integer getInputPageSize()
public void setOutputPageSize(int outputPageSize)
public java.lang.Integer getOutputPageSize()
public java.lang.Integer getOutputPageSize(int requestedPageSize)
public void addToValueMap(java.lang.String inputField,
java.lang.String value)
public java.lang.String getInputValue(java.lang.String inputField)
public void setFixedFields(java.util.Map fixedFields)
public java.util.Map getFixedFields()
public void setQueryFields(java.util.List queryFields)
public java.util.List getQueryFields()
public void setInputFormatters(IFieldFormatter[] fieldFormatters)
public IFieldFormatter[] getInputFormatters()
public void setInputSourcePaging(boolean inputSourcePaging)
public boolean getInputSourcePaging()
public void setOutputSourcePaging(boolean outputSourcePaging)
public boolean getOutputSourcePaging()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||