Im developing a search engine...can anyone help me with the logic and if possible with the sample code.
Actually the content which are to be searched are in a folder and the meta data about each data item in the folder is stored in the Oracle datadase
The Database structure is
Name Null? Type ----------------------------------------- -------- ---------------------------- F_ID NOT NULL VARCHAR2(50) F_NAME NOT NULL VARCHAR2(30) FILE_EXT NOT NULL VARCHAR2(10) DATE_CREATION NOT NULL DATE DATE_LUPDATE NOT NULL DATE D_ID NOT NULL VARCHAR2(25) KEYWORDS NOT NULL VARCHAR2(256) PATH NOT NULL VARCHAR2(256)
the Keyword field holds all the keywords of that particular file. The keywords are stored in sequence seprated by comma for example the keyword is like "key1,key2,key3,key4".
The user enters the searck key in the search field. The key entered by the user should be searched with all the keywords within the database..All the match should be listed and on clicking the match that particular file should be invoked..
You can write one Jdbc program with stored procedure with the keys as the input parameters will suit your problem i think.
Joined: Apr 12, 2005
but actually what i want is the procedure for accompalishing the task..I want sample codes..I want sample code for retriving the information and storing the values in a variable and searching the value aganist the Search key and print the result..
U can then navigate thru the resultset to display the filename and other details.. U can then use FileStream Classes to retrieve the content of the file as the user chooses any match from the result.
Could u tell whether u r developing it for web or as a network application.
Hope this helps.
Joined: Apr 12, 2005
Can u help me with some logic..if what i've mentioned is not the feasible way of searching..
Thanks for the code..
I have the keywords seperated by commas within keywords field.For Exanple tthe data in the keyword field is "Key1,Key2,Key3" and if the Users Search Key is "Key2", then the Key2 exist in the Keyword field..this kind of searching should be done and the result should be a link to the file..
Can u please help me out in reaching a solution..
Joined: Jan 16, 2001
the code i have given does the work of searching in the db for the record that contains the keyword given as searchstring.
Pls clarify whether its a web based search or simple network application.
If its a network application u have to open the file based on the file name from the record and read the content of it and write through the socket.. and in the other end read the data's from the socket and display.
If Web app, u have to create .html file with hyperlinks that point to URL where the file is located, based on the match selected.
Nobody is going to write this for you. If while writing it yourself, you get tripped up on some detail, we're all more than happy to help out, but only if we see that you are writing it yourself.
If the current project is too complicated for you to grasp, step back a bit and find some JDBC and/or Servlet tutorials. Follow them and then try some simple projects until you feel that you understand things better
Ben, actually im not expecting anyone of u to write the code..Actually what i want is Sample Code, i mean, if u have ever come across such implementation...pls try to help me with the Sample Code and this is what i'm expecting.
I think the code that Roshini posted should be enough to get you going. S/He's using the SELECT keyword with LIKE and wildcard chars on either end of the entered string. [ May 11, 2005: Message edited by: Ben Souther ]