|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.search.SearchSuggestion
@Entity public class SearchSuggestion
a suggestion for the AJAX based search.
| Constructor Summary | |
|---|---|
protected |
SearchSuggestion()
Deprecated. |
|
SearchSuggestion(java.util.Locale loc,
java.lang.String query,
long hits)
creates a new SearchSuggestion for the given locale, query and
number of hits. |
| Method Summary | |
|---|---|
void |
addRecurrence(long h,
long i)
adds another recurrence of the search being the base of the suggestion with the given number of results. |
java.lang.String |
getId()
|
double |
getImportance()
returns the importance of the suggestion for ordering, a value between 0 and 1. |
long |
getLastRecurrence()
returns the timestamp of the last recurrence of the search being the base of the suggestion. |
java.util.Locale |
getLocale()
returns the locale of the suggestion. |
long |
getRecurrences()
returns the number of recurrences of the search being the base of the suggestion. |
java.lang.String |
getSearchQuery()
returns the search query of the search being the base of the suggestion. |
static java.lang.String |
shortenSearch(java.lang.String search)
shortens the given search string to be 80 characters or shorter, if possible at a space character. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated protected SearchSuggestion()
public SearchSuggestion(java.util.Locale loc,
java.lang.String query,
long hits)
SearchSuggestion for the given locale, query and
number of hits.
loc - the locale of the searchquery - the search query (limited to 80 characters)hits - the number of matching results| Method Detail |
|---|
public final java.lang.String getId()
public final java.util.Locale getLocale()
public final long getLastRecurrence()
public final long getRecurrences()
public final java.lang.String getSearchQuery()
public final void addRecurrence(long h,
long i)
h - the number of resultsi - the penalty interval, i.e. the minimum interval between two
subsequent recurrences without being considered a flooding
attackpublic final double getImportance()
public static java.lang.String shortenSearch(java.lang.String search)
search - the search string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||