public void startNewSearch(final String query,
                               final List<Param> params,
                               final TimeRange timeRange,
                               final boolean incremental,
                               final boolean storeHistory,
                               final String queryInfo,
                               final ExpressionOperator additionalQueryExpression) {
        GWT.log("SearchModel - startNewSearch()");

        // Destroy the previous search and ready all components for a new search to begin.
        reset(DestroyReason.NO_LONGER_NEEDED);

        final QueryContext currentQueryContext = QueryContext
                .builder()
                .params(params)
                .timeRange(timeRange)
                .queryInfo(queryInfo)
                .dateTimeSettings(dateTimeSettingsFactory.getDateTimeSettings())
                .additionalQueryExpression(additionalQueryExpression)
                .build();

        currentSearch = QuerySearchRequest
                .builder()
                .searchRequestSource(
                        SearchRequestSource
                                .builder()
                                .sourceType(sourceType)
                                .ownerDocRef(queryDocRef)
                                .build())
                .query(query)
                .queryContext(currentQueryContext)
                .incremental(incremental)
                .queryTablePreferences(queryTablePreferencesSupplier.get())
                .build();
//            }
//        }
//
        if (query != null) {
//            final DocRef dataSourceRef = indexLoader.getLoadedDataSourceRef();
//            if (dataSourceRef != null && expression != null) {
            // Let the query presenter know search is active.
            setSearching(true);

            // Reset all result components and tell them that search is
            // starting.
            resultComponents.values().forEach(ResultComponent::reset);
            resultComponents.values().forEach(ResultComponent::startSearch);

            // Start polling.
            polling = true;
            poll(storeHistory);
//            }
        }
    }
Begin executing a new search using the supplied query expression.
stroom-core-client/src/main/java/stroom/query/client/presenter/QueryModel.java