Beispiel #1
0
        public override int DoLogic()
        {
            IndexReader reader = RunData.GetIndexReader();

            RunData.SetIndexReader(null);
            if (reader.RefCount != 1)
            {
                Console.WriteLine("WARNING: CloseReader: reference count is currently " + reader.RefCount);
            }
            reader.DecRef();
            return(1);
        }
Beispiel #2
0
        public override int DoLogic()
        {
            DirectoryReader r  = RunData.GetIndexReader();
            DirectoryReader nr = DirectoryReader.OpenIfChanged(r);

            if (nr != null)
            {
                RunData.SetIndexReader(nr);
                nr.DecRef();
            }
            r.DecRef();
            return(1);
        }
Beispiel #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);
        }
Beispiel #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);
        }