public static void search_query2(String[] query, String[] pages) {

        int matchedCount = 0;

        for (String page : pages) {

            for (int i = 0, idx = 0; i < query.length; i++) {
                idx = page.indexOf(query[i]);
                if(idx != -1) {
                    if (i == query.length - 1) {
                        matchedCount++;
                    }
                }
            }
        }

        System.out.println(matchedCount);

    }