java - How to transfer lucene36 to lucene 40 -
here code
public static void main(string[] args) { string name = "time.stop"; try { stopwordlist swl = new stopwordlist(name); system.out.println(swl.getwords().tostring()); analyzer az = new standardanalyzer(version.lucene_40, swl.getwords()); } catch (filenotfoundexception ex) { } }
here error:exception in thread "main" java.lang.error: unresolved compilation problem: constructor standardanalyzer(version, set) undefined
at stopwordlist.main(stopwordlist.java:49)
your code initializes analyzer
should this:
analyzer az = new standardanalyzer( version.lucene_40, new chararrayset( version.lucene_40, swl.getwords(), true ) );
Comments
Post a Comment