简体   繁体   中英

Solr 4.0 and ResourceLoader: getLines undefined

I'm translating to Lucene 4.0 a plug-in developed over Lucene 3.6, but I'm having so much troubles with ResourceLoader.

I've changed the imports related to ResourceLoader from:

   import org.apache.solr.common.ResourceLoader;
   import org.apache.solr.util.plugin.ResourceLoaderAware;

to:

   import org.apache.lucene.analysis.util.ResourceLoader;
   import org.apache.lucene.analysis.util.ResourceLoaderAware;

But at the inform method:

public void inform(ResourceLoader loader) {

when I try to use the getLines function:

List list = loader.getLines("file");

I get the following error:

The method getLines(String) is undefined for the type ResourceLoader

What am I doing wrong?

Kind regards

At Lucene 4.0, getLines doesn't have to be invoked as a method from ResourceLoader.

Here you can see an example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM