code: public Result execute(@NonNull Search search) throws Exception {
          if (search.getOffset() >= search.getMaxNotes()) {
              throw new IllegalArgumentException("offset must be less than max notes");
          }
  
          Result result = new Result(search.getScopes());
  
          for (Scope scope : search.getScopes()) {
              switch (scope) {
                  case PERSONAL_NOTES:
                      try {
                          result.setPersonalResults(findPersonalNotes(search));
                      } catch (Exception e) {
                          maybeRethrow(search, e);
                      }
                      break;
  
                  case LINKED_NOTEBOOKS:
                      List<LinkedNotebook> linkedNotebooks = getLinkedNotebooks(search, false);
                      for (LinkedNotebook linkedNotebook : linkedNotebooks) {
                          try {
                              result.addLinkedNotebookResult(linkedNotebook, findNotesInLinkedNotebook(search, linkedNotebook));
                          } catch (Exception e) {
                              maybeRethrow(search, e);
                          }
                      }
                      break;
  
                  case BUSINESS:
                      linkedNotebooks = getLinkedNotebooks(search, true);
                      for (LinkedNotebook linkedNotebook : linkedNotebooks) {
                          try {
                              result.addBusinessResult(linkedNotebook, findNotesInBusinessNotebook(search, linkedNotebook));
                          } catch (Exception e) {
                              maybeRethrow(search, e);
                          }
                      }
                      break;
              }
          }
  
          return result;
      }
docs: Submits a search.
  
  @param search The desired search with its parameters.
  @return The result containing multiple {@link NotesMetadataList}s.