Friday, February 27, 2009

PDF files search in sharepoint!

Hidden truth is, Sharepoint doesn't have any of its own search mechanisms. Its just a postman between the client and the database server, where all the sharepoint content is stored. Sharepoint server takes the request string and builds a query to be passed to the SQL server. Upon the query, SQl server passes the string to its own engine! File indexing is maintained on the Index server.

By default, SharePoint only searches the .txt, .htm, .doc, .xls, and .ppt. Coz, SQL Server can crawl through the base file extensions. PDF is a Binary file type can't really be searched with the SQL full text search engine, as it cant understand the format of PDF. So, Adobe came out with its own free filters.
Adobe 5.0 iFilter Download
Adobe 6.0 iFilter Download
You need to follow the installation procedure on the down load page and install the iFilter on the INDEX server.

PDF Docuement Full Text Search:

If you not install the iFilter on the Index server, PDF files will be shown in the search reasults matching the title name only. But, text inside the PDF file is not indexed and not shown in the search resutls. Inorder to index the content inside a PDF docuement(Full Text Search), you need to apply the iFilter on the Index server.

After the full crawl, new uploaded files that are uploaded before the Full Crawl and after the iFilter install are full text indexed automatically. But, some times the files which are uploaded before the IFilter was installed cannot be added to the full text indexing automatically. We need force the full text indexing on these old files by disabling full text indexing and enabling it again in central administration. If it’s not effected by using Central Admin UI, we can use Query Analyzer to force a rebuild, like..

USE WSS Content DB Name
EXEC sp_fulltext_catalog 'STS_servername', 'rebuild'

PDF Icon display:

By default PDF files are shown with an Internet explorer icon in the serach results. Follow the below procedure to associate an icon to the search results(Note: Even though you install iFilter on Index server, this PDF icon procedure has to be followed on each and every front end serer in the SharePoint server farm. i.e All web servers and Index serer)

  1. Go to Adobe site and copy paste the PDF icon(PDFicon.gif) in the below folder.
    drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES
  2. Edit the document mapping XML file(Docicon.xml)
    Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\Docicon.xml
  3. Add the below line under the ByExtension node.
    <Mapping Key="pdf" Value="pdfimage.gif"/>
  4. Recycle the search service:
    Run->cmd iisresetnet stop osearchnet start osearch

For 64-bit windows, you need to download the iFilter seperately. iFilter that comes along with the Adobe V8 installation supports only the 32-bit OS.

SQL Server's search engine deals with the base types and with the addition of new iFilters, it can go right with the associated formats. Microsoft comes out with a free iFilter for RTF. Other available IFilters for PDF, RTF, MSG, ZIP are fount at IFilterShop.

Additional procedure for Adobe v8 iFilter:

Adobe v8 comes along with the iFilter. So, no need to install a iFilter for Adobe V8 on a 32- bit windows. This applies to the 64-bit windows:

  1. Add the filter-extension to the File types crawled:
    Start -> Program -> Microsoft Office Server -> SharePoint 3.0 Central Administration -> Search Settings -> File Types -> New File Type (Add extension pdf here)
  2. Modify the following Registry keys by changing their "Default" value to the new CLSID of the Adobe IFilter: {E8978DA6-047F-4E3D-9C78-CDBE46041603} HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdfDefault -> {E8978DA6-047F-4E3D-9C78-CDBE46041603} HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdfDefault -> {E8978DA6-047F-4E3D-9C78-CDBE46041603}
  3. Add the Installation directory of the Adobe Reader v.8 to the System Path. For example, if the Reader is installed on "C:\Program Files\Adobe", then add"C:\Program Files\Adobe\Reader 8.0\Reader"or"C:\Program Files\Adobe\Reader 9.0\Reader" to the system path by: Right Click on My Computer -> Properties -> Advanced -> Environment Variables -> Path (Under System Variables) -> Edit -> (Add "C:\Program Files\Adobe\Reader 8.0\Reader"). This effectively tells the adobe IFilter where to pick up the dependent DLLs.
  4. Copy the .gif file that you want to use for the icon to the following folder on the server:SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images
  5. Edit the DOCICON.xml file to include the .pdf extension. Navigate to SharePoint Server 2007 - Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml Open the Docicon.xml file. Add an entry for the .pdf extension Save the DOCICON.xml
    Recycle the search service: Run->cmd iisresetnet stop osearchnet start osearch
    Now you can crawl and search PDF documents with v.8 Reader.


Thursday, February 26, 2009

SharePoint Performance

Follow the below things to improve your sharepoint performance

  1. Disable the debug mode by making the "debug" mode is "false" on all web applications
    Web application's web.config -> debug mode "false"
  2. Disable the debug mode at the machine.config.
  3. Have blob cache enabled at the web application's web config file.
    Web application's blob node should be some thing like this:
<BlobCache location=":\blobCache" path="\.(gifjpgpngcssjs)$" maxSize="10" max-age="86400" enabled="true"/>
This will enable the cache file. Al l the files are saved on each and every Web Front 's specified location. By specifying the cache time out , Browser will not rerequest them for about 86400 minutes.

Saturday, February 21, 2009

JavaScript Tabs within the Content Editor Webpart

Copy paste the following code into the 'Source Editor' section in the Content Editor Webpart.
Add the following inside the style node and embed inside the head and html notes. Due to the constraints in the editor can't code exactly.

.ui-tabs-hide{display: none;}ul.ui-tabs-nav{ margin: 0; padding: 8px 0 0 0;}ul.ui-tabs-nav li { list-style: none; margin: 0; display: inline; font-size: 12px;}ul.ui-tabs-nav li a { padding: 5px; margin-right: 3px; border-bottom: none; text-decoration: none; color: #000000; text-transform:uppercase;}ul.ui-tabs-nav li a:hover { color: #000; background: #F1EEE7; text-decoration: none;}.ui-tabs-selected a { background-color: #F1EEE7!important; }ul.ui-tabs-nav li.ui-tabs-unselect a { background-color: #F1EEE7;}ul.ui-tabs-nav li.ui-tabs-unselect a:hover { color: #333; background-color: #F1EEE7;}.ui-tabs-panel { background-color: #F1EEE7; padding: 5px; line-height: 18px;}.ui-tabs-panel ul { margin-left: 0;}.ui-tabs-panel ul li { background-color: #F1EEE7; border-bottom: 1px solid #fff; padding: 5px 0 6px 20px;}

include the following in the body of the hml section after the head section.

div id="topsidebar"
ul class="ui-tabs-nav"
li class="ui-tabs-selected"
a href="#fragment-1

span Office /span /a
/li li class="" a href="#fragment-2" span Email /span /a /li /ul

div id="fragment-1" class="ui-tabs-panel ui-tabs-hide"
p Here are details corresponding to the hotel attendees will be staying at:
/p p a href= Office /a br / head quarters drive Plano TX 75050 br /
Tel: 1-111-111-1111 /p /div div id="fragment-2" class="ui-tabs-panel ui-tabs-hide" p email me p Umakanth Nelige br / a Umakanth nelige E-mail/a br /111.111.1111 /p /div /div

download the JQuery files and copy paste in the content editor webparrt.

Friday, February 20, 2009

Silver Light displaying in a content editor webpart


After uploading the .xap file to the webpart doc lib, and after pointing the xap file with an object tag in the content editor part's source code, you will not see the control.

As the tag never understands the X, Y directinal values, it will display over the content editor.
Content Editor webpart was developed to be enclosed to the page's hidden DIV property, thus causing the tag control to fall in the invisible Div.

Work Around:
  • Set a fixed height and width in the web part appearance properties, and give the object tag a height and width of 100%,

  • Set an absolute height and width for the object tag and leave the web part with non-fixed height and width

Sunday, February 8, 2009

iPhone Allpications fail to run!

Last week I went to my friend's place and forgot to take my charger along with me! As I am a iPhone-junkie these days, played the games all night and chatted with my pals until I was kicked by the battery! As a desperate game freak, I connected my iPhone with my friend's PC.
Now, I cant play games anymore, as they never respond!

Technical Reason:
When I connected my iPhone with my friend's PC, my iPhone's Authentication module got bugged. Now the authentication (Id/pwds) for my i-Tunes and applications will not work, as they think that they are on the wrong iPhone!

Work around:
  • Connect your iPhone to your PC
  • Take the backup (Never forget this step any time)
    Devices ->right Click on your Phone name -> backup
  • Un sync the Applications(Games)
    Devices -> Click on the phone name -> in the right hand tabs area, click on the 'Applications' tab -> un check the 'sync applications' -> Apply -> Sync
  • De Authorize the computer to reset the iPhone Authentication to the scratch.
    On the i-Tunes menu -> Store -> Deauthorize Computer -> Enter the ID & password.
  • Authorize the computer to reset the iPhone from scratch to a valid authentication
    On the i-Tunes menu -> Store -> Authorize Computer -> Enter the ID & password.
  • Sync the Applications(Games)
    Devices -> Click on the phone name -> in the right hand tabs area, click on the 'Applications' tab -> Check the 'sync applications' -> Apply ->Sync.

    Now you are back to freaking games ..! Hav Fun ye..!!