public IndexOperation V2SearchWithSearchIndex(V2SearchRequest request)
        {
            if (HasInvalidParameters(request, packageType: null))
            {
                return(IndexOperation.Empty());
            }

            var parsed = _textBuilder.ParseV2Search(request);

            IndexOperation indexOperation;

            if (TryGetSearchDocumentByKey(request, parsed, out indexOperation))
            {
                return(indexOperation);
            }

            var text       = _textBuilder.Build(parsed);
            var parameters = _parametersBuilder.V2Search(request, IsEmptySearchQuery(text));

            return(IndexOperation.Search(text, parameters));
        }
        public IndexOperation V2SearchWithSearchIndex(V2SearchRequest request)
        {
            if (HasInvalidParameters(request, request.PackageType))
            {
                return(IndexOperation.Empty());
            }

            var parsed = _textBuilder.ParseV2Search(request);

            IndexOperation indexOperation;

            if (request.PackageType == null &&
                TryGetSearchDocumentByKey(request, parsed, out indexOperation))
            {
                return(indexOperation);
            }

            var text       = _textBuilder.Build(parsed);
            var parameters = _parametersBuilder.V2Search(request, text.IsDefaultSearch);

            return(IndexOperation.Search(text.Value, parameters));
        }