Class RemoveUrls
- java.lang.Object
-
- com.funnelback.publicui.search.model.curator.action.RemoveUrls
-
- All Implemented Interfaces:
Action
,HasNoBeans
public final class RemoveUrls extends java.lang.Object implements Action, HasNoBeans
Action to remove a set of URLs within the search results, causing them to be excluded from the result set even if they match the given query. This would generally be done to eliminate a duplicate result which is being displayed through a UrlAdvert or similar. If a URL should be permanently removed it is preferable to either kill it in the index or to avoid gathering it in the first place.
If this action is performed multiple times the list of URLs to be removed will be combined.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.funnelback.publicui.search.model.curator.config.Action
Action.Phase
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
urlsToRemove
The list of URLs to be removed from the results
-
Constructor Summary
Constructors Constructor Description RemoveUrls()
RemoveUrls(java.util.List<java.lang.String> urlsToRemove)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static void
addUrlsStringToRemoveList(SearchTransaction searchTransaction, java.lang.String urlsToRemove)
Add URLs for removal to the searchTranaction.void
configure(Configurer configurer)
Configure this action (expected to autowire in any dependencies)boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getUrlsToRemove()
The list of URLs to be removed from the resultsint
hashCode()
void
performAction(SearchTransaction searchTransaction, Action.Phase phase)
Appends this instance's urlsToRemove to the list of URLs for removal which will be given to padre.boolean
runsInPhase(Action.Phase phase)
URL removal occurs during the input phase (as the actual removal is performed by augmenting the request to padre.void
setUrlsToRemove(java.util.List<java.lang.String> urlsToRemove)
The list of URLs to be removed from the resultsjava.lang.String
toString()
-
-
-
Method Detail
-
performAction
public void performAction(SearchTransaction searchTransaction, Action.Phase phase)
Appends this instance's urlsToRemove to the list of URLs for removal which will be given to padre.- Specified by:
performAction
in interfaceAction
- Parameters:
searchTransaction
- Current search transactionphase
- The phase being processed (Some actions may wish to behave differently depending on the current phase of processing).
-
addUrlsStringToRemoveList
static void addUrlsStringToRemoveList(SearchTransaction searchTransaction, java.lang.String urlsToRemove)
Add URLs for removal to the searchTranaction. This must occur during the input lifecycle (after the padre query is run it will be too late).- Parameters:
searchTransaction
- The SearchTransaction object to be modifiedurlsToRemove
- A space separated list of URLs to be removed
-
runsInPhase
public boolean runsInPhase(Action.Phase phase)
URL removal occurs during the input phase (as the actual removal is performed by augmenting the request to padre.- Specified by:
runsInPhase
in interfaceAction
- Parameters:
phase
- The phase being processed (Some actions may wish to behave differently depending on the current phase of processing).- Returns:
- true if this action should be run in the given phase, otherwise return false.
-
configure
public void configure(Configurer configurer)
Configure this action (expected to autowire in any dependencies)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getUrlsToRemove
public java.util.List<java.lang.String> getUrlsToRemove()
The list of URLs to be removed from the results
-
setUrlsToRemove
public void setUrlsToRemove(java.util.List<java.lang.String> urlsToRemove)
The list of URLs to be removed from the results
-
-