public static void main(String[] args) {
		//get lexicon index from disk
		String lexicon_file = "";
		Map<String,int[]> lexicon_index = setupLexicon(lexicon_file);
		//get url index from disk
		String url_file = "";
		Map<Integer, UrlDocLen> url_index = setupUrl(url_file);
		
		
		//interface
		while(true)
		{
			System.out.print("Please input the query:");
			try{
				//get console input
			    BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
			    String input = bufferRead.readLine();
			    System.out.println(input);
                String[] words = input.split(" ");
                List<String> results;
                if(words.length>10)
                {
                	//cut words into 10
                    String[] cutWord = new String[10];
                    for(int i=0; i<10; i++)
                    {
                    	cutWord[i] = words[i];
                    }
                    results = query(words);//result are urls, 10
                }
                else
                {
                	results = query(words);//result are urls, 10
                }
                
                for(int i=0; i < results.size(); i++)
                {
                	System.out.println(results.get(i));
                }
                //finish
			}
			catch(IOException e)
			{
				e.printStackTrace();
			}
		}

	}