Thank you for your response Lefteris,
I was trying to run on the command line only because running the Smart Search Index is failing in the Smart Search Component. Basically it appears to be timing out. It never finishes. Then it also appears to have not indexed all of the K2 content and it also does not index any of the other content, including my EasyBlog content. I had thought this was possibly an EasyBlog problem but Mark from StackIdeas.com checked it out and let me know that the failure was coming from K2.
Because the indexer is failing I started searching for some possible solutions. I read on the Joomla.org site that sometimes the Indexer might fail if there are too many items to index. However, I have no idea how many is too many. I have just over 400 K2 items and just over 400 EasyBlog posts. So, somehow I do not believe I would qualify as having too many. But, I guess that is a possibility. Regardless, that is where I found instructions abour running on the command line might work.
After I ran on the command line I encountered the errors which I submitted. My assumption was that maybe those errors being from K2 might have been what Mark from StackIdeas had run into and why he stated that K2 was causing the Smart Search Index problems. Your reply seems to indicate that those errors will occur any time the indexing is done from the command line without the addition of the code you provider being added into the file at plugins/finder/k2.php
I did not yet add that code because I first want to solve the problem of why the Smart Search Index is not working from the Component. Mark from StackIdeas was able to get my other content indexed by disabling the Smart Search - K2 finder plugin, as well as all the content plugins and then indexing from within the Smart Search Component. After that I ran the index again and it got my K2 items indexed although I am not sure it got them all. In fact I would be surprised if it successfully indexed all my K2 items since it did not complete.
I also found something else that looked interesting to me at
github.com/joomlaworks/k2/issues/79 The entry I found below makes me wonder if this is something that I could add in order to fix my problem with the Smart Search Index apparently crashing when launched from the Smart Search Component:
kavadas commented on Nov 29, 2013
I think that you should go with the web interface for this. That's also why the finder plugins are there. They will update the database when a record is updated. In any case try to add the following line in the file components/com_k2/helpers/route.php:
require_once JPATH_ADMINISTRATOR.'/components/com_k2/models/model.php';
Place it at the beginning of the file. Note that this might fix this issue but you may face other issues. K2 uses a system plugin to load it's classes. If the CLI does not invoke the system plugins you will get another Fatal error on some other file/line.
I have been hesitant to edit any K2 files but if you think that the instructions from jkavadas from Nov 29, 2013 are relevant than I can add it to the route.php file to see if it fixed the indexing from the component.
I can also add the five lines of code you provided to plugins/finder/k2.php and test from the command line afterwards.
I hope this makes sense. Have you ever seen K2 causing the Smart Search Index to fail from the Component?
Thank you, Sean Carney