|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.nava.informa.search.ChannelSearcher
public class ChannelSearcher
PUBLIC: Utility class for executing searches against the full-text index that does allow to directly obtain the found news items.
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_RESULTS
The default maximum number of search results that should be returned by the query. |
| Constructor Summary | |
|---|---|
ChannelSearcher(String indexDir)
Constructor which allows to specify the index directory. |
|
| Method Summary | |
|---|---|
String |
getIndexDir()
|
int |
getNrOfHits()
Returns the number of news items found from the previous full-text search query. |
List<ItemResult> |
search(ChannelGroupIF channels,
String queryString)
Performs a query on the full-text index using the field ItemFieldConstants.TITLE_AND_DESC as the default search
field limited to DEFAULT_MAX_RESULTS number of search
results. |
List<ItemResult> |
search(ChannelGroupIF channels,
String queryString,
int maxResults)
Performs a query on the full-text index using the field ItemFieldConstants.TITLE_AND_DESC as the default search
field. |
void |
setIndexDir(String indexDir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MAX_RESULTS
| Constructor Detail |
|---|
public ChannelSearcher(String indexDir)
throws IOException
StandardAnalyzer
is used.
indexDir - - The directory from which the index can be retrieved.
IOException| Method Detail |
|---|
public List<ItemResult> search(ChannelGroupIF channels,
String queryString)
throws QueryParseException,
IOException
ItemFieldConstants.TITLE_AND_DESC as the default search
field limited to DEFAULT_MAX_RESULTS number of search
results.
QueryParseException
IOException
public List<ItemResult> search(ChannelGroupIF channels,
String queryString,
int maxResults)
throws QueryParseException,
IOException
ItemFieldConstants.TITLE_AND_DESC as the default search
field.
QueryParseException
IOExceptionpublic int getNrOfHits()
public void setIndexDir(String indexDir)
public String getIndexDir()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||