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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -