Missing Sharepoint Search results

Symptom: Sharepoint V3.0 Users are unable to search for more recently added items in sharepoint site that uses sql2005. The search still works for older items. These older items were being returned by the sharepoint search.

Doing some research on the net, I found out that the tempDB may run out of disk space. The default installation places the tempdb on the drive c: . Typically, our bigger storage drives are in some other drives, like e:, f: or g:.

The tempdb database that was used by Sharepoint Search Service to place temporary data was on Drive C:. This Drive only has only limited space left. We had to move the TempDB to the larger drive.
The Solution is from source Article: http://www.sqlteam.com/article/moving-the-tempdb-database

SQL commands in query prompt:

USE tempdb
exec sp_helpfile

name file
tempdev C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\templog.ldf
templog C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\tempdb.mdf

SQL Commands in query prompt to move the database:

ALTER database tempdb
modify file (name=tempdev, FILENAME=’e:\sqldata\tempdb2005.mdf’)

ALTER database tempdb
modify file (name=templog, FILENAME=’e:\sqldata\temp2005.ldf’)

This will delete the tempdb from drive c: and move it to drive e:
The next step is to initiate full crawl. I could not find a GUI counterpart on the Operations side of the Sharepoint central admin and my research shows this solution Source: http://msmvps.com/blogs/obts/archive/2007/01/13/490152.aspx

1. start up cmd.exe
2. change directory to “Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
3. Run the following commands:

stsadm.exe -o spsearch -action fullcrawlstop

stsadm.exe -o spsearch -action fullcrawlstart

now wait a bit…

It is now working!!

The cause of the indexing not being up to date could maybe traced to the fact that I had a sql maintenance plan to backup the databases. Unfortunately, standard practice calls for the indexes to be rebuild if necessary. This was a NO NO for sharepoint as some of the indexes had to have duplicates.
See article:

“We recently deployed Microsoft SharePoint Office Server 2007 (MOSS) and ran into an issue with the Office SharePoint Search Service. The Search service was stuck in the “Crawling Full” state. After about 1 week of troubleshooting with Microsoft Product Support, we have resolved our problem. In a nutshell, our Database Maintenance plan included a task to rebuild indexes which had a side effect of removing the ability to allow duplicate keys in the index which SharePoint Search requires. The lesson I learned here is to not include any index maintenance as part of your database back strategy for SharePoint 2007. For more details and how to fix the problem”

So I had to recreate the maintenance plan to NOT include any reindexing of the sharepoint database.
Thanks to all the previous authors that had experienced the same problem. I decided to put all their solutions on this blog post as they are all needed to really solve this problem.