|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.search.impl.SimpleSearchImpl
public class SimpleSearchImpl
Search is the implementation of the simple SimpleSearch
interface, using a Query under the hood.
| Field Summary |
|---|
| Fields inherited from interface com.day.cq.search.SimpleSearch |
|---|
RELATED_PREFIX |
| Constructor Summary | |
|---|---|
SimpleSearchImpl(org.apache.sling.api.resource.Resource resource,
QueryBuilder builder,
StatisticsService statsService)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addPredicate(Predicate predicate)
Allows to add custom predicates for the underlying Query. |
String |
getExcerptPropertyNames()
|
long |
getHitsPerPage()
|
String |
getQuery()
|
List<String> |
getRelatedQueries()
|
SearchResult |
getResult()
|
String |
getSearchIn()
|
String |
getSearchProperties()
|
long |
getStart()
|
Trends |
getTrends()
|
void |
setExcerptPropertyNames(String properties)
|
void |
setHitsPerPage(long num)
|
void |
setQuery(String query)
Sets a new fulltext query that will be executed. |
void |
setSearchIn(String searchIn)
|
void |
setSearchProperties(String properties)
|
void |
setStart(long start)
This sets an offset for the actual search results, ie. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSearchImpl(org.apache.sling.api.resource.Resource resource,
QueryBuilder builder,
StatisticsService statsService)
resource - the current resource.builder - the query builderstatsService - the statistics service.| Method Detail |
|---|
public SearchResult getResult()
throws RepositoryException
getResult in interface SimpleSearchnull if there is no query
parameter set.
RepositoryException - if an exception occurs while executing the
query.public Trends getTrends()
getTrends in interface SimpleSearch
public List<String> getRelatedQueries()
throws RepositoryException
getRelatedQueries in interface SimpleSearchRepositoryException - if an error occurs while reading from
the repository.public String getQuery()
getQuery in interface SimpleSearchpublic void setQuery(String query)
setQuery in interface SimpleSearchquery - the fulltext query.public long getHitsPerPage()
getHitsPerPage in interface SimpleSearchpublic void setHitsPerPage(long num)
setHitsPerPage in interface SimpleSearchnum - the number of hits to display on a page.public String getSearchIn()
getSearchIn in interface SimpleSearchpublic void setSearchIn(String searchIn)
setSearchIn in interface SimpleSearchsearchIn - the location where to search in.public String getSearchProperties()
getSearchProperties in interface SimpleSearchpublic void setSearchProperties(String properties)
setSearchProperties in interface SimpleSearchproperties - comma separated names of the properties that will be searched.public String getExcerptPropertyNames()
getExcerptPropertyNames in interface SimpleSearchpublic void setExcerptPropertyNames(String properties)
setExcerptPropertyNames in interface SimpleSearchproperties - comma separated names of the properties that will be
used in an excerpt.public long getStart()
getStart in interface SimpleSearchpublic void setStart(long start)
SimpleSearchstart) items of the underlying result iterator.
setStart in interface SimpleSearchstart - the offset in the actual search results to start frompublic void addPredicate(Predicate predicate)
SimpleSearchQuery.
addPredicate in interface SimpleSearchpredicate - a search predicate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||