Example usage for org.apache.solr.core StandardIndexReaderFactory StandardIndexReaderFactory

List of usage examples for org.apache.solr.core StandardIndexReaderFactory StandardIndexReaderFactory

Introduction

In this page you can find the example usage for org.apache.solr.core StandardIndexReaderFactory StandardIndexReaderFactory.

Prototype

StandardIndexReaderFactory

Source Link

Usage

From source file:com.lucid.solr.sidecar.SidecarIndexReaderFactory.java

License:Apache License

@Override
public void init(NamedList args) {
    super.init(args);
    docIdField = (String) args.get("docIdField");
    sourceCollection = (String) args.get("sourceCollection");
    boostField = (String) args.get("boostField");
    enabled = (Boolean) args.get("enabled");
    //LOG.info("CIRF INIT called, enabled=" + enabled);
    String modeString = (String) args.get("mode");
    if (modeString != null) {
        try {/*w  w w.j av  a2  s  . co  m*/
            Mode m = Mode.valueOf(modeString);
            mode = m;
        } catch (Exception e) {

        }
    }
    if (mode == Mode.total) {
        multiplier = 100.0f;
    } else {
        multiplier = 1.0f;
    }
    standardFactory = new StandardIndexReaderFactory();
    standardFactory.init(args);
}

From source file:com.lucid.solr.sidecar.SidecarIndexReaderFactory.java

License:Apache License

public void init(String docIdField, String sourceCollection, String boostField, Mode mode) {
    this.docIdField = docIdField;
    this.sourceCollection = sourceCollection;
    this.boostField = boostField;
    this.enabled = true;
    standardFactory = new StandardIndexReaderFactory();
    this.mode = mode;
    if (mode == Mode.total) {
        multiplier = 100.0f;/*from   ww  w  .  jav  a  2  s . c  o  m*/
    } else {
        multiplier = 1.0f;
    }
}