public static class OpenSearchDocumentSourceDescriptor.AttributeBuilder extends MultipageSearchEngineDescriptor.AttributeBuilder
OpenSearchDocumentSource
component. You can use this
builder as a type-safe alternative to populating the attribute map using attribute keys.Modifier and Type | Field and Description |
---|---|
Map<String,Object> |
map
The attribute map populated by this builder.
|
Modifier | Constructor and Description |
---|---|
protected |
AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.
|
searchMode, searchMode
compressed, documents, query, query, results, results, resultsTotal, start, start
public OpenSearchDocumentSourceDescriptor.AttributeBuilder feedUrlTemplate(String value)
${variable}
. The following
variables are supported:
searchTerms
will be replaced by the querystartIndex
index of the first result to be searched. Mutually
exclusive with startPage
startPage
index of the first result
to be searched. Mutually exclusive with startIndex
.count
the number of search results per pageExample URL feed templates for public services:
http://www.nature.com/opensearch/request?interface=opensearch&operation=searchRetrieve&query=${searchTerms}&startRecord=${startIndex}&maximumRecords=${count}&httpAccept=application/rss%2Bxml
http://www.indeed.com/opensearch?q=${searchTerms}&start=${startIndex}&limit=${count}
OpenSearchDocumentSource.feedUrlTemplate
public OpenSearchDocumentSourceDescriptor.AttributeBuilder feedUrlTemplate(org.carrot2.util.attribute.IObjectFactory<? extends String> value)
${variable}
. The following
variables are supported:
searchTerms
will be replaced by the querystartIndex
index of the first result to be searched. Mutually
exclusive with startPage
startPage
index of the first result
to be searched. Mutually exclusive with startIndex
.count
the number of search results per pageExample URL feed templates for public services:
http://www.nature.com/opensearch/request?interface=opensearch&operation=searchRetrieve&query=${searchTerms}&startRecord=${startIndex}&maximumRecords=${count}&httpAccept=application/rss%2Bxml
http://www.indeed.com/opensearch?q=${searchTerms}&start=${startIndex}&limit=${count}
OpenSearchDocumentSource.feedUrlTemplate
public OpenSearchDocumentSourceDescriptor.AttributeBuilder resultsPerPage(int value)
OpenSearchDocumentSource.resultsPerPage
public OpenSearchDocumentSourceDescriptor.AttributeBuilder resultsPerPage(org.carrot2.util.attribute.IObjectFactory<? extends Integer> value)
OpenSearchDocumentSource.resultsPerPage
public OpenSearchDocumentSourceDescriptor.AttributeBuilder maximumResults(int value)
OpenSearchDocumentSource.maximumResults
public OpenSearchDocumentSourceDescriptor.AttributeBuilder maximumResults(org.carrot2.util.attribute.IObjectFactory<? extends Integer> value)
OpenSearchDocumentSource.maximumResults
public OpenSearchDocumentSourceDescriptor.AttributeBuilder feedUrlParams(Map<String,String> value)
OpenSearchDocumentSource.feedUrlTemplate
on each request.OpenSearchDocumentSource.feedUrlParams
public OpenSearchDocumentSourceDescriptor.AttributeBuilder feedUrlParams(org.carrot2.util.attribute.IObjectFactory<? extends Map<String,String>> value)
OpenSearchDocumentSource.feedUrlTemplate
on each request.OpenSearchDocumentSource.feedUrlParams
public OpenSearchDocumentSourceDescriptor.AttributeBuilder userAgent(String value)
null
value is provided,
the following User-Agent will be sent: Rome Client (http://tinyurl.com/64t5n)
Ver: UNKNOWN
.OpenSearchDocumentSource.userAgent
public OpenSearchDocumentSourceDescriptor.AttributeBuilder userAgent(org.carrot2.util.attribute.IObjectFactory<? extends String> value)
null
value is provided,
the following User-Agent will be sent: Rome Client (http://tinyurl.com/64t5n)
Ver: UNKNOWN
.OpenSearchDocumentSource.userAgent