Пример #1
0
        public override int DoLogic()
        {
            Directory   dir = RunData.Directory;
            IndexReader r   = null;

            if (userData == null)
            {
                r = DirectoryReader.Open(dir);
            }
            else
            {
                r = DirectoryReader.Open(OpenReaderTask.FindIndexCommit(dir, userData));
            }
            Console.WriteLine("--> numDocs:" + r.NumDocs + " dels:" + r.NumDeletedDocs);
            r.Dispose();
            return(1);
        }
Пример #2
0
        public override int DoLogic()
        {
            Directory   dir = RunData.Directory;
            IndexReader r; // LUCENENET: IDE0059: Remove unnecessary value assignment

            if (userData is null)
            {
                r = DirectoryReader.Open(dir);
            }
            else
            {
                r = DirectoryReader.Open(OpenReaderTask.FindIndexCommit(dir, userData));
            }
            Console.WriteLine("--> numDocs:" + r.NumDocs + " dels:" + r.NumDeletedDocs);
            r.Dispose();
            return(1);
        }
Пример #3
0
        public override int DoLogic()
        {
            Store.Directory dir = RunData.Directory;
            DirectoryReader r   = null;

            if (commitUserData != null)
            {
                r = DirectoryReader.Open(OpenReaderTask.FindIndexCommit(dir, commitUserData));
            }
            else
            {
                r = DirectoryReader.Open(dir);
            }
            RunData.SetIndexReader(r);
            // We transfer reference to the run data
            r.DecRef();
            return(1);
        }
Пример #4
0
        public override int DoLogic()
        {
            Store.Directory dir = RunData.Directory;
            DirectoryReader r; // LUCENENET: IDE0059: Remove unnecessary value assignment

            if (commitUserData != null)
            {
                r = DirectoryReader.Open(OpenReaderTask.FindIndexCommit(dir, commitUserData));
            }
            else
            {
                r = DirectoryReader.Open(dir);
            }
            RunData.SetIndexReader(r);
            // We transfer reference to the run data
            r.DecRef();
            return(1);
        }
Пример #5
0
        public override int DoLogic()
        {
            PerfRunData runData = RunData;
            Config      config  = runData.Config;
            IndexCommit ic;

            if (commitUserData != null)
            {
                ic = OpenReaderTask.FindIndexCommit(runData.Directory, commitUserData);
            }
            else
            {
                ic = null;
            }

            IndexWriter writer = CreateIndexTask.ConfigureWriter(config, runData, OpenMode.APPEND, ic);

            runData.IndexWriter = writer;
            return(1);
        }