This method will add the given routing as both search & index routing.
517141
public K addRouting(String routing) {
        this.indexRouting.add(routing);
        this.searchRouting.add(routing);
        return (K) this;
    }
535791
def add_route(route, endpoint=None, **kw):
    

    # ensure correct amout of slashes
    def apiurl(route):
        return '/'.join(s.strip('/') for s in ["", BASE_URL, route])

    return add_senaite_route(apiurl(route), endpoint, **kw)
939175
public void addSearchIndex(I_CmsSearchIndex searchIndex) {

        if (!searchIndex.isInitialized()) {
            if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                try {
                    searchIndex.initialize();
                } catch (CmsException e) {
                    // should never happen
                    LOG.error(e.getMessage(), e);
                }
            }
        }

        // name: not null or emtpy and unique
        String name = searchIndex.getName();
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_MISSING_NAME_0));
        }
        if (m_indexSources.keySet().contains(name)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_INVALID_NAME_1, name));
        }

        m_indexes.add(searchIndex);
        if (m_adminCms != null) {
            initOfflineIndexes();
        }

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_ADD_SEARCH_INDEX_2,
                    searchIndex.getName(),
                    searchIndex.getProject()));
        }
    }
709552
@Deprecated
    public void add(String route, String acceptType, Object target) {
        try {
            int singleQuoteIndex = route.indexOf(SINGLE_QUOTE);
            String httpMethod = route.substring(0, singleQuoteIndex).trim().toLowerCase(); // NOSONAR
            String url = route.substring(singleQuoteIndex + 1, route.length() - 1).trim(); // NOSONAR

            // Use special enum stuff to get from value
            HttpMethod method;
            try {
                method = HttpMethod.valueOf(httpMethod);
            } catch (IllegalArgumentException e) {
                LOG.error("The @Route value: "
                              + route
                              + " has an invalid HTTP method part: "
                              + httpMethod
                              + ".");
                return;
            }
            add(method, url, acceptType, target);
        } catch (Exception e) {
            LOG.error("The @Route value: " + route + " is not in the correct format", e);
        }
    }
158381
def add_post(self, path: str, handler: _WebHandler,
                 **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_POST, path, handler, **kwargs)
835854
public function addStaticRoute($request, $destinationPage) {
        if (file_exists(PAGES. DS . $destinationPage)) {
            $this->_staticRoutes[$request] = $destinationPage;
        } else {
            throw new RoutingException('Non existant static route specified: ' . $destinationPage);
        }
    }
354854
def add_put(self, path: str, handler: _WebHandler,
                **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_PUT, path, handler, **kwargs)
434462
public   String addDocument(String indexName, String indexType,String addTemplate, Object bean,String refreshOption) throws ElasticSearchException{
		StringBuilder builder = new StringBuilder();
		ClassUtil.ClassInfo classInfo = ClassUtil.getClassInfo(bean.getClass());
		Object id = BuildTool.getId(bean,classInfo);
		Object routing = BuildTool.getRouting(bean,classInfo);

		builder.append(indexName).append("/").append(indexType);
		if(id != null){
			builder.append("/").append(id);
		}
		Object parentId = BuildTool.getParentId(bean,classInfo);
		if(refreshOption != null ){
			builder.append("?").append(refreshOption);
			if(parentId != null){
				builder.append("&parent=").append(parentId);
			}
			if(routing != null){
				builder.append("&routing=").append(routing);
			}
		}
		else if(parentId != null){
			builder.append("?parent=").append(parentId);
			if(routing != null){
				builder.append("&routing=").append(routing);
			}
		}
		else if(routing != null){
			builder.append("?routing=").append(routing);
		}
		String path = builder.toString();
		builder.setLength(0);
		path = this.client.executeHttp(path,ESTemplateHelper.evalDocumentTemplate(esUtil,builder,indexType,indexName,addTemplate,bean,"create"),ClientUtil.HTTP_POST);
		builder = null;
		return path;
	}
411491
def add(self, method, path_settings, target):
        
        self.routes.append(Route(method, path_settings, target))
        return
1023982
def add_route(route)
      raise InvalidRouteError.new('Route must respond to #url_for') unless valid_route?(route)
      @routes << route unless route_exists?(route)
    end
65621
def add_breadcrumb_to(name, url, trail_index)
      breadcrumb_trails
      @breadcrumb_trails[trail_index] ||= []
      @breadcrumb_trails[trail_index] << {
        name: case name
              when Proc then name.call(self)
              else name
              end,
        url:  case url
              when Proc then url.call(self)
              else url ? url_for(url) : nil
              end
      }
    end
48657
public void addRegexRoute(String urlPattern, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
        addRoute(new Route(urlPattern, true), actorClass);
    }
584454
public RouteBuilder put(){

        if(!methods.contains(HttpMethod.PUT)){
            methods.add(HttpMethod.PUT);
        }
        return this;
    }
1112087
public String addDocument(String indexName, String indexType, Object params,ClientOptions clientOptions) throws ElasticSearchException{
		if(params instanceof Map){
			return addMapDocument(indexName,indexType,(Map)params,clientOptions);
		}
		Object docId = null;
		Object parentId = null;
		Object routing = null;
		String refreshOption = null;
		if(clientOptions != null) {
			refreshOption = clientOptions.getRefreshOption();
			ClassUtil.ClassInfo beanClassInfo = ClassUtil.getClassInfo(params.getClass());
			docId = clientOptions.getIdField() != null ? BuildTool.getId(params, beanClassInfo, clientOptions.getIdField()) : null;
			parentId = clientOptions.getParentIdField() != null ? BuildTool.getParentId(params, beanClassInfo, clientOptions.getParentIdField()) : null;
			routing = clientOptions.getRountField() != null ? BuildTool.getRouting(params, beanClassInfo, clientOptions.getRountField()) : null;
		}
		return addDocument(  indexName,   indexType,   params,  docId,  parentId,  routing,  refreshOption);
	}
1184088
function addRedirectRoute(server, scaffold) {
        assert(scaffold.path && scaffold.target, `TransomScaffold redirectRoute requires 'path' and 'target' to be specified.`);

        server.get(scaffold.path, function (req, res, next) {
            res.redirect(scaffold.target, next);
        });
    }
499422
public MethodlessRouter<T> addRoute(String pathPattern, T target) {
		PathPattern p = new PathPattern(pathPattern);
		if (routes.containsKey(p)) {
			return this;
		}

		routes.put(p, target);
		return this;
	}
126783
function addResourceRoute(routePath, controllerName) {
		resourceRouting.forEach(function(route) {
			var actionPath = route.path.replace(':controller', controllerName);
			route.verbs.forEach(function (verb) {
				addSingleRoute(verb, actionPath, controllerName, route.target.action);
			});
		});
	}