public bool IsValidFileSearchQuery(string searchTerm)
 {
     try
     {
         var query = FilePathQueryParser.Parse(searchTerm);
         return(query != null);
     }
     catch
     {
     }
     return(false);
 }
        /// <summary>
        /// Returns a search query, for the specified search type
        /// </summary>
        /// <param name="searchType">Search type.</param>
        /// <param name="searchQuery">Search query.</param>
        /// <returns>Query object, or null, if search type is not supported.</returns>
        private Query SearchQuery(string searchType, string searchQuery)
        {
            switch (searchType)
            {
            case SearchType.Files:
                return(FilePathQueryParser.Parse(searchQuery));

            case SearchType.Contents:
                return(ContentsQueryParser.Parse(searchQuery));

            case SearchType.Tags:
                return(TagsQueryParser.Parse(searchQuery));

            default:
                return(null);
            }
        }