public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		        
		        //¶Ӧı,ĽȷĽ
				request.setCharacterEncoding("gbk");
				response.setContentType("text/html;charset=gbk");
				
				//ĬϵϢ
		        String searchPath = "D:\\Bingo_Index";
		        
		        //ȡûȡĹؼ
				String keyWords = (String) request.getParameter("keyWords");
				//ServletContextʵ
				ServletContext sc = getServletContext();
				/**
				 * ؼΪգתerrorҳ
				 * Ҳjavascript valadition֤
				 */
				if(keyWords==null){
					RequestDispatcher rd = sc.getRequestDispatcher("/error.jsp");
					rd.forward(request, response);
					return;
				}
				
				//ûж
				//ԲͬĲѯͣȥͬĿ¼¼
				String searchType = request.getParameter("searchType");
				if(!searchType.equals("webPage") && (searchType != null)) {
					searchPath = SearchType.getSearchType(searchType);
				}
				
				//ҳ
				String startLocationTemp = request.getParameter("startLocation");
				if(startLocationTemp != null) {
			    //parseInt 
				int startLocation = Integer.parseInt(startLocationTemp);
				System.out.println(startLocation);
				}
		        
				//ִ
				Analyzer analyzer = null;
				//ҳ
				Highlighter highlighter = null;
				/**
				 * DocumentLuceneҪ
				 */
				List<Document> list = new ArrayList<Document>();
				Integer totalCount = null;

				try {
					IndexSearcher indexSearch = new IndexSearcher(searchPath);
					analyzer = new MMAnalyzer();
					String[] field = { "title", "content", "link"};
					//
					Map<String, Float> boosts = new HashMap<String, Float>();
					boosts.put("title", 3f);
					QueryParser queryParser = new MultiFieldQueryParser(field,
							analyzer, boosts);
					Filter filter = null;
					try {
						/**
						 * ǾĲѯʵ
						 * queryParserLuceneҪĲѯ
						 */
						Query query = queryParser.parse(keyWords);
						TopDocs topDocs = indexSearch.search(query, filter, 1000,
								new Sort(new SortField("size")));
						totalCount = new Integer(topDocs.totalHits);
						SimpleHTMLFormatter simpleHTMLFormatter = new SimpleHTMLFormatter(
								"<font color='red'>", "</font>");
						//
						highlighter = new Highlighter(simpleHTMLFormatter,
								new QueryScorer(query));
						
						highlighter.setTextFragmenter(new SimpleFragmenter(70));
						for (int i = 0; i < topDocs.totalHits; i++) {
							ScoreDoc scoreDoc = topDocs.scoreDocs[i];
							int docSn = scoreDoc.doc; // ĵڲ
							Document doc = indexSearch.doc(docSn); // ݱȡӦĵ
							list.add(doc);
						}
					} catch (ParseException e) {
						e.printStackTrace();
					}
				} catch (CorruptIndexException e) {
					e.printStackTrace();
				} catch (IOException e) {
					e.printStackTrace();
				}
				RequestDispatcher rd = sc.getRequestDispatcher("/result.jsp");
				request.setAttribute("keyWords", keyWords);
				request.setAttribute("totalCount", totalCount);
				request.setAttribute("docList", list);
				request.setAttribute("analyzer", analyzer);
				request.setAttribute("highlighter", highlighter);
				/**
				 * RequestDispatcherṩforwardinclude
				 */
				rd.forward(request, response);
	}