+ Start a Discussion

Content search in Documents

Hi Friends,


Scenario:-  Like google search,if u enter any searchkey in textbox,then search will be done in docments,which u have uploaded salesforce,then the documents which contains that searchkey will displays in VF page



          Can u anybody share u r knowledge with us




Tryout this sample code to content search in document :


                                                <apex:page showHeader="false" sidebar="false">

                                                <apex:pageBlock >

                                                <b>Enter search term: </b>

                                                <apex:form >


                                                function doSearch()


                                                var searchStr = document.getElementById('txtSearch').value;

                                                window.open('/_ui/common/search/client/ui/UnifiedSearchResults?sen=001&sen=015&str=' + encodeURIComponent(searchStr), "_parent" );




                                                <input value="Go!" id="btnSearch"/>


                                                (<strong>NOTE:</strong> Only searches Accounts and document)






  Understand Scenario,


                         i have   DOC1 contains  Hari,Charan,Nara

                                       DOC2 contains Hari&Nara

                                       DOC3 Contains charan.


Now,  my requirement is if  i entered Charan in text box ,then search will be done and documents which are containing Charan will displayed on VF page.


here: result:-         DOC1,DOC3


so plaese suggest me how i can achieve that ,how we can access the content of document