Class Processor

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected SDField addField​(Search search, SDField field, java.lang.String suffix, java.lang.String indexing, java.lang.String queryCommand)
      Convenience method for adding a no-strings-attached implementation field for a regular field
      void fail​(Search search, com.yahoo.document.Field field, java.lang.String msg)  
      protected java.lang.String formatError​(java.lang.String searchName, java.lang.String fieldName, java.lang.String msg)  
      protected java.util.Iterator<RankProfile.RankSetting> matchingRankSettingsIterator​(Search search, RankProfile.RankSetting.Type type)
      Returns an iterator of all the rank settings with given type in all the rank profiles in this search definition.
      protected java.lang.RuntimeException newProcessException​(Search search, com.yahoo.document.Field field, java.lang.String msg)  
      protected java.lang.RuntimeException newProcessException​(java.lang.String searchName, java.lang.String fieldName, java.lang.String msg)  
      abstract void process​(boolean validate, boolean documentsOnly)
      Processes the input search definition by modifying the input search and its documents, and returns the input search definition.
      protected void warn​(Search search, com.yahoo.document.Field field, java.lang.String msg)  
      protected void warn​(java.lang.String searchName, java.lang.String fieldName, java.lang.String msg)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • search

        protected final Search search
      • deployLogger

        protected com.yahoo.config.application.api.DeployLogger deployLogger
    • Constructor Detail

      • Processor

        public Processor​(Search search,
                         com.yahoo.config.application.api.DeployLogger deployLogger,
                         RankProfileRegistry rankProfileRegistry,
                         QueryProfiles queryProfiles)
        Base constructor
        Parameters:
        search - the search to process
        deployLogger - Logger du use when logging deploy output.
        rankProfileRegistry - Registry with all rank profiles, used for lookup and insertion.
        queryProfiles - The query profiles contained in the application this search is part of.
    • Method Detail

      • process

        public abstract void process​(boolean validate,
                                     boolean documentsOnly)
        Processes the input search definition by modifying the input search and its documents, and returns the input search definition.
        Parameters:
        validate - true to throw exceptions on validation errors, false to make the best possible effort at completing processing without throwing an exception. If we are not validating, emitting warnings have no effect and can (but must not) be skipped.
        documentsOnly - true to skip processing (including validation, regardless of the validate setting) of aspects not relating to document definitions (e.g rank profiles)
      • addField

        protected SDField addField​(Search search,
                                   SDField field,
                                   java.lang.String suffix,
                                   java.lang.String indexing,
                                   java.lang.String queryCommand)
        Convenience method for adding a no-strings-attached implementation field for a regular field
        Parameters:
        search - the search definition in question
        field - the field to add an implementation field for
        suffix - the suffix of the added implementation field (without the underscore)
        indexing - the indexing statement of the field
        queryCommand - the query command of the original field, or null if none
        Returns:
        the implementation field which is added to the search
      • formatError

        protected java.lang.String formatError​(java.lang.String searchName,
                                               java.lang.String fieldName,
                                               java.lang.String msg)
      • newProcessException

        protected java.lang.RuntimeException newProcessException​(java.lang.String searchName,
                                                                 java.lang.String fieldName,
                                                                 java.lang.String msg)
      • newProcessException

        protected java.lang.RuntimeException newProcessException​(Search search,
                                                                 com.yahoo.document.Field field,
                                                                 java.lang.String msg)
      • fail

        public void fail​(Search search,
                         com.yahoo.document.Field field,
                         java.lang.String msg)
      • warn

        protected void warn​(java.lang.String searchName,
                            java.lang.String fieldName,
                            java.lang.String msg)
      • warn

        protected void warn​(Search search,
                            com.yahoo.document.Field field,
                            java.lang.String msg)