|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.ProcessingComponentBase
org.carrot2.source.SearchEngineBase
public abstract class SearchEngineBase
A base class facilitating implementation of IDocumentSources wrapping external
search engines with remote/ network-based interfaces. The base class defines the common
attribute fields used by more specific base classes and concrete implementations.
SimpleSearchEngine,
MultipageSearchEngine| Field Summary | |
|---|---|
boolean |
compressed
Indicates whether the search engine returned a compressed result stream. |
Collection<Document> |
documents
|
String |
query
|
int |
results
|
long |
resultsTotal
|
int |
start
|
SearchEngineStats |
statistics
This component usage statistics. |
| Constructor Summary | |
|---|---|
SearchEngineBase()
|
|
| Method Summary | |
|---|---|
protected void |
afterFetch(SearchEngineResponse response)
Called after a single search engine response has been fetched. |
protected static void |
clean(SearchEngineResponse response,
boolean keepHighlights,
String... fields)
Unescape HTML entities and tags from a given set of fields of all
documents in the provided response. |
protected static String |
urlEncode(String string)
URL-encodes a string into UTF-8. |
| Methods inherited from class org.carrot2.core.ProcessingComponentBase |
|---|
afterProcessing, beforeProcessing, dispose, getContext, getSharedExecutor, init, process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.carrot2.core.IProcessingComponent |
|---|
afterProcessing, beforeProcessing, dispose, init, process |
| Field Detail |
|---|
public int start
public int results
public String query
public long resultsTotal
public Collection<Document> documents
public boolean compressed
public SearchEngineStats statistics
| Constructor Detail |
|---|
public SearchEngineBase()
| Method Detail |
|---|
protected static void clean(SearchEngineResponse response,
boolean keepHighlights,
String... fields)
fields of all
documents in the provided response.
response - the search engine response to cleankeepHighlights - set to true to keep query terms highlightsfields - names of fields to cleanprotected void afterFetch(SearchEngineResponse response)
protected static final String urlEncode(String string)
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||