How to implement a search engine in java ?

Hi All,
1. Can anyone explain me with java code how to connect to a excel database residing on a
different(I know that we do it thro' dsn) machine in my network. I know that we do it with a dsn.
I created a network map but when I execute the statement
"Connection conn = (Connection)DriverManager.getConnection("jdbc:odbc:accesscarddsn");"
then I am getting the error:
SQLException:[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
2. I am doing a website where some pages of website are jsp, servlets. I want to implement a search functionality in my site so that if the user types a keyword then I need to show him the links to the pages(whether jsp,html) which contain this keyword. How do I do that other than using property files .
Thanks & Regards,
Kumar.

With regard to your first question,you need to supply user name and passwrd in the connection statement.I guess that's problem when it saya..too few parameters. IF there is no user name and passwd, sne dnull strings.
With regard to the search functionality, there are many ways you can implement it.I am not sure about any readymade products available on the web, however you can code it yourself, it might be time consuming but I feel it is better.You can do it this way:
1. Parse all the html docs in ur website, ignore all the html tags and maintain a HASH table of all words and the locations you found the word in.You can optioanlly remove all stopwords, i.e. words that occur commonly like 'a', 'an' etc..
2. The next phase is to take a query through a cgi program and search the hash table for all keywords,make sure you seach for each keyword in the query seperately.Retreieve the docs, display the results on a html page.
Cheers!

Similar Messages

  • How to set another search engine in safari?

    hi all
    can anybody tell how to set another search engine than google/yahoo in safari (e.g. Bing)?
    thank you

    At this stage, I don't know of any workarounds (or available plugins) for Safari for Windows 4.0.4 that allow you to put a different search engine option in the search field.
    The workaround I've been using is to pin a Bing window into my Top Sites.
    You can send an enhancement request to Apple about it. Although it doesn't look to be set up for it, if you bring up your Menu Bar and go "Help > Report bugs to Apple", you can use that bug report form to ask for enhancements. I was skeptical about that to begin with, but apparently they check that for feature enhancement requests, according to the following document. (It's mentioned right down the very bottom.)
    [Safari 4 for Windows|http://support.apple.com/kb/HT3657]

  • How to add a search engine manually to Firefox. (No, not via add ons)

    How to add a search engine manually to Firefox?
    For example, what should I do add a custom search engine? It is not available via add-ons. When I go to the search page, Firefox doesn't detect it and it doesn't prompt me or allow me to add it as a search provider. I am looking for options similar to that in Chromium browser.
    let's say for instance, if I want to add redhat bugzilla to my search providers, I can go to search settings and just add https://bugzilla.redhat.com/buglist.cgi?quicksearch=%s
    Is there any similar option available in Firefox?

    I use these;
    '''[https://addons.mozilla.org/en-US/firefox/addon/add-to-search-bar/ Add to Search Bar]''' {web link}
    Make any pages' search functionality available in the Search Bar
    '''[https://addons.mozilla.org/en-US/firefox/addon/context-search/ Context Search]''' {web link}
    Expands the context menu's 'Search for' item into a list of
    installed search engines, allowing you to choose the engine
    you want to use for each search.
    '''[https://addons.mozilla.org/en-US/firefox/addon/searchthissite/ SearchThisSite]''' {web link}
    Allows you to search the website currently viewed with
    the website's internal search engine (and not the default
    FF search engine or an external engine)

  • How to add a search engine  like What do you love of Google ?

    how to add a search engine  like What do you love of Google ? I use Glims but it doesn't work or I don't know how to go about it
    Thanks

    You can also add any search engine not already listed in Glims by using the method described here:
    http://www.machangout.com/tutorials/addsearchengine
    Just enter the name you give the search engine in the name field, and the URL for it in the Query URL field.

  • How to implement google search in portal application

    Hi,
      I am using  "http://api.google.com/GoogleSearch.wsdl" file to implement google search in portal application. but i am not able to get the search result. how to implement google search. is this "http://api.google.com/GoogleSearch.wsdl" is vaild now ?. how to achieve the soultion.
    Regards,
    Shanthakumar.

    Hi Shanthakumar,
    The "GoogleSearch.WSDL" is no longer available as google has replaced it with the new AJAX based searching and they have eventually removed it from public use as well from 7th September 2009. So, I would imagine you would not be able to use the earlier WSDL file for google search. You might have to look in using the new "AJAX Search API". For more information have a look the following links. You can notice "No Longer Available" at the top of the page.
    http://googlecode.blogspot.com/2009/08/well-earned-retirement-for-soap-search.html
    http://code.google.com/apis/soapsearch/api_faq.html#tech15
    I hope this helps you.
    Regards,
    Gopal.

  • How to implement fuzzy search in Query variables

    Dear Experts,
    Fuzzy search is eazy implemented in the abap  , but I do not know how to implement fuzzy search in Query variables
    our company have  a report,with input variable of customer code,   the user want to input 3 bits as fuzzy search. for example,
    the customer code  have 10 bit,  she want to only  input 3 bits before-- EAE *
    and hope the results will  be displayed.  if you have any solution , please advise. 
    ManyTthanks.
    Best Regards.
    Steve

    closed

  • How to implement alphabetic search in combo box

    Hi all,
    how to implement alphabetic search in combo box through coding.
    Thanks for any replies

    Im not sure if I undestand correctly, but example is
    sCFL_ID = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFL = oFormKontrolaMZ.ChooseFromLists.Item(sCFL_ID)
                        If oCFLEvento.BeforeAction = False Then
                            Dim oDataTable As SAPbouiCOM.DataTable
                            oDataTable = oCFLEvento.SelectedObjects
                                    val = oDataTable.GetValue(1, 0)
    oForm.DataSources.UserDataSources.Item("EditDS").ValueEx  = val
    and then load from datasource to matrix.
    hope it helps
    Petr

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • How to implement a note on a Java AS(i.e.Enterprise portal)

    Hello
    How to implement a note on a Java AS(i.e.Enterprise portal)
    Thx in advance

    Hi,
    Could you please let us know what kind of note you want to implement on EP ?
    Thanks
    Sunny

  • How to Implement the Search page for Workflow Notifications?

    Hi All,
    I want to implement the new Search page for Workflow Notifications. Search page containing Company, Paygroup, Source, Initiator, Supplier Name, From date & To date fields. These fields(Poplist & Calendar) are getting the values from different tables and these fields are not in WF_NOTIFICATIONS table only Initiator & dates are there. After selecting the values in all fields or one field based upon these values I want to display the all Workflow Notifications ( Those are satisfy the search criteria only not all ) in Advance Worklist Table RN in the Notifications page. Is it possible to create the Search page based upon the above scenario if Yes Let me know how to implement this search page for Workflow. Page was designed but how to get the sortlisted Notifications and how to pass these values to next page?
    Thanks in advance.
    Edited by: user635152 on Nov 13, 2008 10:53 AM

    Hi Guru,
    I crete the Search page having 5 poplists and select the values from dropdown list and click GO button it serch the records and displays that records in ResultsTable in same page.
    My case, Search page is running fine if I select the values and click GO button page is refreshed without errors but I am unable to displays the records in ResultsTable.
    What I am missing?
    My Select Stmt:
    SELECT * FROM      
    (select wn.nid notification_id
    ,ou.name company
              ,I.PAY_GROUP_LOOKUP_CODE paygroup
              ,'AP' source
              ,pf.full_name initiator
              ,pv.vendor_name supplier_name
              ,I.GL_DATE FROM_TO_DATE
    from ap_invoices_all i
    , po_vendors pv
         , hr_operating_units ou
         , per_all_people_f pf     
         , FND_USER FU
    , (SELECT trim(substr(substr(substr(WN.subject,(instr(WN.subject,'Invoice ') + 8),100),1,100),
    1,instr(substr(substr(WN.subject,(instr(WN.subject,'Invoice ') + 8),100),1,100),' for'))) inv_no
    ,notification_id nid
    FROM WF_NOTIFICATIONS WN
    WHERE WN.MESSAGE_TYPE = 'APINV'
    AND WN.STATUS NOT IN ('CANCELED','CLOSED')) wn
    where i.vendor_id = pv.vendor_id
    and i.invoice_num = wn.inv_no
    and i.WFAPPROVAL_STATUS = 'REQUIRED'
    and pv.vendor_name = nvl(:vendor_name,pv.vendor_name)
    and i.org_id = OU.organization_id
    AND OU.name like nvl(:company_name,name)
    and i.pay_group_lookup_code = nvl(:pay_group,i.pay_group_lookup_code)
    and exists (select ad.invoice_id
    from ap_invoice_distributions_all ad
    where ad.invoice_id = i.invoice_id
    and ad.accounting_date between nvl(:from_date,ad.accounting_date)
                                       and nvl(:to_date,ad.accounting_date))
    and 'AP' = nvl(:source,'AP')
         and i.created_by = fu.user_id
         AND fu.EMPLOYEE_ID = pf.person_id
         AND pf.full_name like nvl(:initiator, pf.full_name)
    UNION ALL
              select po_num.nid notification_id
              ,ou.name company
              ,ps.PAY_GROUP_LOOKUP_CODE paygroup
              ,'PO' source
              ,pf.full_name initiator
              ,pv.vendor_name supplier_name
              ,P.CREATION_DATE FROM_TO_DATE
         from po_headers_all p
         ,po_vendors pv
              ,po_vendor_sites_all ps
              ,hr_operating_units ou
              ,per_all_people_f pf
         ,(select trim(substr(wn.subject,24,instr(wn.subject,' for')-24)) po_no, notification_id nid
              FROM WF_NOTIFICATIONS WN
         WHERE WN.MESSAGE_TYPE = 'POAPPRV'
         AND WN.STATUS NOT IN ('CANCELED','CLOSED')
         and wn.subject like 'Standard Purchase Order%') po_num
         where p.SEGMENT1 = po_num.po_no
         and p.vendor_id = pv.vendor_id
         and p.org_id in(select organization_id
         from hr_operating_units
         where name like nvl(:company_name,name))
         and pv.vendor_name = nvl(:vendor_name,pv.vendor_name)
         and p.AUTHORIZATION_STATUS = 'IN PROCESS'
         and p.CANCEL_FLAG = 'N'
         and 'PO' = nvl(:source,'PO')
         and p.agent_id = pf.person_id
         and pf.full_name like nvl(:initiator, pf.full_name)
         and pv.vendor_id = ps.vendor_id
         and ps.org_id = ou.organization_id
         and ou.name like nvl(:company_name,name)
    and ps.PAY_GROUP_LOOKUP_CODE = nvl(:pay_group,ps.PAY_GROUP_LOOKUP_CODE)
         and trunc(p.creation_date) between nvl(:from_date,trunc(p.creation_date)) and nvl(:to_date,trunc(p.creation_date))
    In CO PFR Code:
    if (pageContext.getParameter("Go") != null)
    OAQueryUtils.checkSelectiveSearchCriteria(pageContext, webBean);
         String COMPANY = pageContext.getParameter("COMPANY");
    String PAYGROUP = pageContext.getParameter("PAYGROUP");
    String SOURCE = pageContext.getParameter("SOURCE");
    String INITIATOR = pageContext.getParameter("INITIATOR");
    String SUPPLIER_NAME = pageContext.getParameter("SUPPLIER_NAME");
    Boolean executeQuery = BooleanUtils.getBoolean(false);
    Serializable[] parameters = { COMPANY, PAYGROUP, SOURCE, INITIATOR, SUPPLIER_NAME, executeQuery};
    Class[] paramTypes = { String.class, String.class, String.class, String.class, String.class, Boolean.class };
    am.invokeMethod("initSearch", parameters, paramTypes);
    OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("ResultsTable");
    table.queryData(pageContext, false);
    AM invoke Method():
    public void initSearch(String company,
    String paygroup,
    String source,
    String initiator,
    String supplier_name,
    Boolean executeQuery)
    WorklistFindVOImpl vo = getWorklistFindVO1();
    if (vo == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "WorklistFindVO1") };
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    vo.initQuery(company, paygroup, source, initiator, supplier_name, executeQuery);
    VO Code:
    public void initQuery(String company,
    String paygroup,
    String source,
    String initiator,
    String supplier_name,
    Boolean executeQuery)
    StringBuffer whereClause = new StringBuffer(500);
    Vector parameters = new Vector(5);
    int clauseCount = 0;
    int bindCount = 0;
    setWhereClauseParams(null); // Always reset
    if ((company != null))
    String companyname = null;
    try
    companyname = new String(company);
    catch(Exception e) {}
    whereClause.append("COMPANY= :COMPANY");
    whereClause.append(++bindCount);
    parameters.addElement(company);
    clauseCount++;
    if ((paygroup != null) && (!("".equals(paygroup))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("PAYGROUP = :PAYGROUP");
    whereClause.append(++bindCount);
    parameters.addElement(paygroup);
    clauseCount++;
    if ((source != null) && (!("".equals(source))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("SOURCE = :SOURCE");
    whereClause.append(++bindCount);
    parameters.addElement(source);
    clauseCount++;
    if ((initiator != null) && (!("".equals(initiator))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("INITIATOR = :INITIATOR");
    whereClause.append(++bindCount);
    parameters.addElement(initiator);
    clauseCount++;
    if ((supplier_name != null) && (!("".equals(supplier_name))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("SUPPLIER_NAME = :SUPPLIER_NAME");
    whereClause.append(++bindCount);
    parameters.addElement(supplier_name);
    clauseCount++;
    setWhereClause(whereClause.toString());
    if (bindCount > 0)
    Object[] params = new Object[bindCount];
    parameters.copyInto(params);
    setWhereClauseParams(params);
    if ((executeQuery != null) && (executeQuery.booleanValue()))
    executeQuery();
    } // end initQuery()
    Please let me know what I did mistake in my code?
    I am unable to find it what I missing and there is no errors but no records displayed in Results Table.
    Please it's urgent.
    Thanks
    Nag.
    Edited by: user635152 on Nov 19, 2008 4:43 PM

  • How can we change search engine using DISM

    sir how can we change search engine from "bing" to "Google" in offline image using DISM. what is that DISM command?

    Hi,
    There is no such command to achieve what you want.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • How to interact with google search engine using java HTTP POST

    I am trying to develop an desktop app that acts as an online radio tuner. I want to use google as an index site for actually searching for radio stations online. So I was wandering if it is possible for me to use java to actually interface with the google search engine servers. For example, I have built a gui that allows you to enter search text. This gui will connect to the web. I would like it to connect to the Google site and post the query to the google web servers. Then i would like to began to parse the response( html page) that i get back from the google servers. Like using google without actually typing in the text field on the google site. Can anyone tell me if it is possible to do this with java. If so, what would be the best way to go about doing this. Thanks.

    Thanks for the response. It was actually alot easier to do than I anticipated. All I had to do was create a URL object initialized with the google url(search text embedded in the url - http://www.google.com/search?q=" + searchText + "&hl=en&ie=UTF-8&oe=UTF8).
    Looks like this:
    String google = http://www.google.com/search?q=" + searchText + "&hl=en&ie=UTF-8&oe=UTF8;
    URL url = new URL(google);  // creating Google Url object
    URLConnection connection = url.openConnection();
           connection.setDoOutput(true);
           connection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );  // fooling google servers into thinking the request is coming from a real browser
           BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));The content returned by the google server can be accessed calling the BufferedReader class methods.

  • Search Engine in Java

    Hi All,
    I just wonder anyone can lend me a hand please. I am using Java to develop a search engine at the moment, I need to store all the words from a single html page, and I have done this, but the thing is how can I get all pages from a certain intranet? Thank you in advance.
    Best Regards,
    Ray

    As per my knowledge any search engine while use the meta data of a html page first then go for the whole contents.
    Ans it is always better to use google or any other searching tool instead of developing it from scratch. it is good only for practice.

  • How do you add search engines to the Smart Search bar?

    The whole point of an omnibar is so you can easily search a variety of search providers without having to go to their website first. For instance, in every other web browser I can type "i Oranges" and get pictures of oranges from Google Images. Or I can type "a Cookbooks" and instantly search Amazon for cookbooks. In every other web browser, in fact, I've been able to do this since at least 2010.  What's the problem Apple? Can you seriously not figure out how to implement this? "Smart Search" isn't smart at all if I'm going to be stuck with the default 3 search engines.
    I really hate when Apple pulls crap like this and I will be switching back to PC next time I upgrade. "It just works" has become a thing of the past and OSX seems to work against me more than it works for me. I shouldn't have to fight my OS to make it do what I want. Ridiculous.

    Whomever told you to hide text is leading you down the wrong path. Doing dirty tricks like that may help you in the extremely short term but the bigger search engines are smart enough to figure out what you're doing. Dirty tricks are a great way to get your site banned from the search engines.
    The best way to get good results is to make sure all important text is actually text on the page (not images), have fresh content (blogs are great examples of this, they tend to do well on search engines), and find good ways to get other sites to link back to your site (link farms are not what I'm talking about but think along the lines of reviews, interviews, forum signature posts, etc.).
    Be very wary of people telling you they can guarantee you first page results in search engines. They may do that for a short while but search engines are constantly evolving and can drop you as quickly—if not quicker—than pick you up.
    It takes time to get a site in the top rankings but there are other methods out there that are better in the long run.

  • How to build a search engine in the database?

    Hi there,
    say I have 3 tables:
    1. Table_empl: idEmpl, fname, lname, dob...
    2. table_department: idDpartment, idEmpl, departmentName, section...
    3. table_fligths: idFlight, idEmapl, departure date, destination, carrier...I would like to provide the end-user a text box (in my GUI) where he can write whatever he would like to get info about. If, for example, he'll write: british-airways, I expect the system to search everything in the db that matches this input.
    Question: How can I design such a search engine that retrieve information from every possible table in the db with reference to every column.
    thanks for any pointers

    thanks darted for your reply. so what do you recommend? should i give the end user all names of tables and columns and ask him to choose from the list and than build a query based on that?
    this is optional but i'd rather have one exec button and to return all possible results from the db. if (in the example i provided) it found 'british airways' in the carrier - than that a result. if it founds 'british' in the lname of table_emple - that's another result. so the output should be something like:
    found 2 matches:
    1. british airways, 10/10/2006, LHR
    2. British, John, 12/01/63,
    any idea how to build that?

Maybe you are looking for

  • Hard drive will not mount shows up in Disk Utility

    I have an external drive with a bootable OS X 10.6.8. I was in a transition between building up a SSD swapped drive. The SSD is installed in the CPU box but I have my old installation running from an external. I have several external hard drives. The

  • Spry Accordion Image Issue

    I have inserted a Spry Accordion in Dreamweaver CS5, however, I'm having issues with the viewing of the tabs on load, on hover, etc. I want a dark blue tab on load, have it change to a wavy red white tab, and when opened go to a dark blue tab with a

  • How to get child process instance id from main process

    Hi All, I have a main process invoiking a child process 1 and child process 1 inturn calling child process 2.Is there any way to get the child process 2 instance id from main process or main process instance id from child process 2.. Using tree finde

  • Transparent objects not displaying correctly

    Interactive pdfs  which were created in  indesign  and  functioned perfectly  in  Acrobat  XI  and Acrobat reader    are failing  to display correctly  in  Acrobat DC  Specifically  Drop shadows  and transparent items  display as heavily pixelated me

  • Quicksilver persistent freezing

    My Quicksilver 2002 freezes at or near startup all the time. This is an improvement, as no startup at all was the condition before I replaced the CPU going from a dual 1 gig to a single 1 gig card. The Apple Hardware Test cd indicates a logic board e