Uploaded image for project: 'Zoie'
  1. Zoie
  2. ZOIE-103

zoie-solr doesn't support to choose the model of Diectory.

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:
      None

      Description

      In ZoieSystemHome.java

      if (isTypeZoie) {
      ZoieSystem<IndexReader, DocumentWithID> zoieSystem = new ZoieSystem<IndexReader, DocumentWithID>(idxFile,
      new ZoieSolrIndexableInterpreter(), new DefaultIndexReaderDecorator(), zoieConfig);

      It doesn't support to choose the model of Diectory.
      The DefaultDirectoryManager use the default model : SIMPLE

      I suggest to change by follow :

      String modelValue = config.get("zoie.model", "SIMPLE");
      DIRECTORY_MODE model = DIRECTORY_MODE.SIMPLE;
      if (modelValue.equals("NIO"))

      { model = DIRECTORY_MODE.NIO; }

      else if (modelValue.equals("MMAP"))

      { model = DIRECTORY_MODE.MMAP; }

      log.info("DIRECTORY_MODE:" + model);
      if (isTypeZoie) {
      DirectoryManager dirMgr = new DefaultDirectoryManager(idxFile, model);

      ZoieSystem<IndexReader, DocumentWithID> zoieSystem = new ZoieSystem<IndexReader, DocumentWithID>(dirMgr,
      new ZoieSolrIndexableInterpreter(), new DefaultIndexReaderDecorator(), zoieConfig);

        Attachments

          Activity

            People

            • Assignee:
              jwang John Wang
              Reporter:
              genuine yuzhenyuan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: