2014年6月25日

Solr Suggest 配置

摘要: 1.配置stringsuggestorg.apache.solr.spelling.suggest.Suggesterorg.apache.solr.spelling.suggest.tst.TSTLookuptext0.0001spellcheckerfreqtruetrue-->truesugg... 阅读全文

posted @ 2014-06-25 15:45 staben 阅读(694) 评论(0) 推荐(0) 编辑

2014年4月11日

Solr4.7+Tomcat7.0配置

摘要: 1.下载安装jdk,配置环境变量3.安装tomcat 确保localhost可以正常运行2.下载Solr 地址:http://lucene.apache.org/solr/downloads.html3.解下载的Solr压缩文件将\solr-4.7.0\dist中的solr-*(版本号).war复制到 C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps将复制的文件命名成solr.war如果此时tomcat是运行的 则这webapps下有解压的solr文件复制\solr-4.7.0\example\lib下的jar文件 到 阅读全文

posted @ 2014-04-11 09:32 staben 阅读(396) 评论(0) 推荐(0) 编辑

2014年3月19日

Solr suggest 搜索建议功能 配置问题

摘要: string suggest org.apache.solr.spelling.suggest.Suggester org.apache.solr.spelling.suggest.tst.TSTLookup ProductName 0.0001 spellchecker freq true true--> true suggest true false ... 阅读全文

posted @ 2014-03-19 18:23 staben 阅读(1149) 评论(0) 推荐(0) 编辑

2014年3月18日

Solr 通过经纬度指定范围搜索

摘要: 项目进行中,完成后会把部分配置方法和说明写出来,供大家批评、指责、交流。网上资料太少或者不靠谱。1.C#项目使用的SolrNet进行Solr操作。... 阅读全文

posted @ 2014-03-18 13:39 staben 阅读(592) 评论(0) 推荐(0) 编辑

2014年1月5日

Quartz.net 实例

摘要: 1.作业调度框架 实例代码:class Program { private static ILog log = LogManager.GetLogger(typeof (Program)); static void Main(string[] args) { ISchedulerFactory factory=new StdSchedulerFactory(); IScheduler scheduler = factory.GetScheduler(); //... 阅读全文

posted @ 2014-01-05 01:34 staben 阅读(669) 评论(0) 推荐(0) 编辑

log4net简单实例

摘要: 1.导入Log4net.dll程序集2.在项目相关的AssemblyInfo.cs中添加:[assembly: log4net.Config.XmlConfigurator(Watch = true)]如果单独设置的log4net.config配置文件可以这么写:[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)] ... 阅读全文

posted @ 2014-01-05 01:03 staben 阅读(287) 评论(0) 推荐(0) 编辑

2013年10月31日

依赖注入(Autofac)

摘要: 1.下载autofac压缩包:http://code.google.com/p/autofac/downloads/list2.解压获得autofac.dll和autofac.configuration.dll文件依赖注入顾名思义 要存在依赖关系例如: class DataBaseManager { IDataBase _idatabase; public DataBaseManager(IDataBase idatabase) { } }下面是上图中需要的接口和相应的基类: interface I... 阅读全文

posted @ 2013-10-31 16:50 staben 阅读(401) 评论(0) 推荐(0) 编辑

2013年9月9日

设计模式_状态模式_C#

摘要: public class Context { private State state; public State State { get { return state; } set { state = value; } } public Context(State state) { this.state = state; } /// /// /// public ... 阅读全文

posted @ 2013-09-09 17:37 staben 阅读(177) 评论(0) 推荐(0) 编辑

2013年8月14日

C# XML操作

摘要: public static void Main() { string ids="1,2,3,4,5,6,9"; string filePath = "c://c/d/qq.xml"; string xmlPath = "getsomething/news/list/store"; string subString = xmlPath.Substring(0,xmlPath.LastIndexOf('/')); string now = xmlPath.Substri... 阅读全文

posted @ 2013-08-14 00:20 staben 阅读(236) 评论(0) 推荐(0) 编辑

2013年8月13日

策略模式_C#_设计模式

摘要: abstract class Strategy { public abstract void IsStrategy(); } class StrategyA : Strategy { public override void IsStrategy() { Console.WriteLine("IsStrategyA"); } } class StrategyB : Strategy { public override void IsStrategy() ... 阅读全文

posted @ 2013-08-13 00:11 staben 阅读(175) 评论(0) 推荐(0) 编辑

导航