我们信息检索大作业是做一个小型搜索引擎,我在试着用ajax和lucene,在看电子书《征服ajax-lucene构建搜索引擎》,按照书上内容敲了程序,其中有两行代码如下:
doc.add(Field.Text("contents", reader));
doc.add(Field.Keyword("path",f.getAbsolutePath()));报错,说是the method Text is not defined for the type Field;
the method Keyword is not defined for the type Field;由于还是菜鸟,请高手们赐教啊
doc.add(Field.Text("contents", reader));
doc.add(Field.Keyword("path",f.getAbsolutePath()));报错,说是the method Text is not defined for the type Field;
the method Keyword is not defined for the type Field;由于还是菜鸟,请高手们赐教啊
小写t.
doc.add(new Field('contents', reader));
doc.add(new Field('path', f.getAbsolutePath(), Field.Store.YES, Field.Index.UN_TOKENIZED));谢谢大家,分数大家平分一下吧
These methods have been considered deprecated since version 1.9.1. The javadocs for version 2.0 don't even mention them, not even in the list of deprecated methods. I had to download the javadocs for 1.9.1 to find out.
Please, guys, post an errata somewhere. And if some Lucene developer is around, please don't remove from the list of deprecated methods the ones that have been phased-out in old versions; it is useful for adapting old code to use newer versions of the library. 这个也是我从网上别人博客里找到的,呵呵,问题解决了就好啦
String hql="from Users as u where u.username='"+name+"'and u.password='"+pass+"'";
return this.getHibernateTemplate().find(hql);
}
}
显示the method getHibernateTemplate()is not defined for the type UserDaoImpl请问这个问题怎么解决呢,谢谢啊