Class 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 results
      int 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 results
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • urlsToRemove

        private java.util.List<java.lang.String> urlsToRemove
        The list of URLs to be removed from the results
    • Constructor Detail

      • RemoveUrls

        public RemoveUrls​(java.util.List<java.lang.String> urlsToRemove)
      • RemoveUrls

        public RemoveUrls()
    • 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 interface Action
        Parameters:
        searchTransaction - Current search transaction
        phase - 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 modified
        urlsToRemove - 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 interface Action
        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)
        Specified by:
        configure in interface Action
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.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