code: private static SuggestTree checkIndexName(HttpServletRequest request,
  			ProcessRetrieveResponse response, ServletContext context) {
  		String indexName = request
  				.getParameter(ProtocolConstants.INDEX_PARAMETER);
  		SuggestTree index = null;
  		// if no indexName Parameter was provided use the default index.
  		if (indexName == null) {
  			indexName = ProtocolConstants.DEFAULT_INDEX_NAME;
  			response.addIndexWarning(RetrieveStatusCodes.NO_INDEX_GIVEN);
  			index = ContextListener.getIndex(indexName, context);
  		}
  		// if an indexName Parameter was provided use this one
  		else {
  			index = ContextListener.getIndex(indexName, context);
  			// if the indexName given is unknown to the server use the default.
  			if (index == null) {
  				indexName = ProtocolConstants.DEFAULT_INDEX_NAME;
  				response.addIndexWarning(RetrieveStatusCodes.INDEX_UNKNOWN);
  				index = ContextListener.getIndex(indexName, context);
  			}
  		}
  		return index;
  	}
docs: Returns the search Index according to the indexName Parameter of the ASTP
  if no Parameter was in the request the default index will be used. if the
  parameter did not match any known index the default index will be used.
  returns null if the default index is requested but does not exist
  
  @param request
  @param response