首页>代码>java lucene实现近实时搜索及高亮显示的代码例子下载>/message5_1/src/org/itat/message/action/IndexAction.java
package org.itat.message.action;

import javax.annotation.Resource;

import org.itat.message.iservice.IIndexService;
import org.itat.message.util.ActionUtil;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@Controller("indexAction")
@Scope("prototype")
public class IndexAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IIndexService indexService;
	private String con;
	
	

	public String getCon() {
		return con;
	}
	public void setCon(String con) {
		this.con = con;
	}
	public IIndexService getIndexService() {
		return indexService;
	}
	@Resource
	public void setIndexService(IIndexService indexService) {
		this.indexService = indexService;
	}

	public String show() {
		return SUCCESS;
	}
	
	public String commit() {
		indexService.updateCommitIndex();
		ActionContext.getContext().put("urlAction", "index_show.action");
		return ActionUtil.REDIRECT;
	}
	
	public String reconstructor() {
		indexService.updateReconstructorIndex();
		ActionContext.getContext().put("urlAction", "index_show.action");
		return ActionUtil.REDIRECT;	
	}
	
	public String updateSet() {
		indexService.updateSetIndex();
		ActionContext.getContext().put("urlAction", "index_show.action");
		return ActionUtil.REDIRECT;	
	}
	
	public String search() {
		ActionContext.getContext().put("pages", indexService.findByIndex(con));
		return SUCCESS;
	}
}
最近下载更多
813405250  LV5 2021年1月2日
Sillage  LV3 2020年6月1日
全国12345  LV3 2020年5月17日
cbl234  LV1 2020年4月10日
shenshenya  LV2 2019年5月26日
执笔写下青春  LV12 2018年6月19日
mahuig  LV10 2018年4月18日
lindawhn  LV6 2018年4月12日
fengzf  LV16 2018年1月12日
ypf8312  LV22 2017年9月7日
最近浏览更多
zjut_ywf 2023年11月13日
暂无贡献等级
jy1218  LV12 2023年2月16日
cfdymyj 2022年10月8日
暂无贡献等级
BestClever  LV32 2022年6月15日
dongzhan  LV12 2021年12月16日
dongzhan  LV12 2021年12月16日
lirui9900  LV1 2021年11月16日
西凉河的葛三叔  LV3 2021年8月28日
shion994  LV6 2021年5月18日
lodddy  LV6 2021年5月4日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友