diff --git a/public/components/query_compare/search_result/index.tsx b/public/components/query_compare/search_result/index.tsx index 4ab681b..82d0ecd 100644 --- a/public/components/query_compare/search_result/index.tsx +++ b/public/components/query_compare/search_result/index.tsx @@ -15,13 +15,15 @@ import { SearchResults, QueryError, QueryStringError } from '../../../types/inde import { ResultComponents } from './result_components/result_components'; import { useSearchRelevanceContext, initialQueryErrorState } from '../../../contexts'; +const DEFAULT_QUERY = '{}'; + interface SearchResultProps { http: CoreStart['http']; } export const SearchResult = ({ http }: SearchResultProps) => { - const [queryString1, setQueryString1] = useState(''); - const [queryString2, setQueryString2] = useState(''); + const [queryString1, setQueryString1] = useState(DEFAULT_QUERY); + const [queryString2, setQueryString2] = useState(DEFAULT_QUERY); const [queryResult1, setQueryResult1] = useState({} as any); const [queryResult2, setQueryResult2] = useState({} as any); const [searchBarValue, setSearchBarValue] = useState(''); diff --git a/public/components/query_compare/search_result/search_components/search_configs/search_config.tsx b/public/components/query_compare/search_result/search_components/search_configs/search_config.tsx index 8a1c852..8f98e55 100644 --- a/public/components/query_compare/search_result/search_components/search_configs/search_config.tsx +++ b/public/components/query_compare/search_result/search_components/search_configs/search_config.tsx @@ -108,6 +108,13 @@ export const SearchConfig: FunctionComponent = ({ label="Query" error={!!queryError.queryString.length && {queryError.queryString}} isInvalid={!!queryError.queryString.length} + labelAppend={ + + setShowFlyout(true)}> + Help + + + } > = ({

Enter a query in OpenSearch Query DSL. Use %SearchText% to refer to the text in the search - bar. Need more help?{' '} - setShowFlyout(true)} - style={{ margin: '0 -8px' }} - > - See some examples - - . + bar.