T
Tom Dyess
I'm converting a search engine from Delphi to Java and would like some help
with my strategy. This is for the oraclepower.com website.
BACKGROUND:
I have a table of links that I need to match up with keywords the user
enters. If the user enters the keywords "oracle" and "reports" I query the
database for all link titles and descriptions that exist in the table
something like this
SELECT col1..coln
FROM LINK_LIST
WHERE title like '%keyword%' or subject like '%keyword%'
I then pull the recordset into what is called a client data set (Delphi),
which is a
recordset "in memory" instead of one directly attached to a database or XML
file. I
then use an algorithm to weight each result based on where and how many
times it appears in title and link, then sort by weight, then display the
resource to the web page.
QUESTION:
Do the java libraries have an object that can easily be loaded from a
ResultSet, have a weight column added to it then sort itself, then examine
the columns from the memory object; or do I have to create this object
myself?
If I have to create this myself, what objects will help me reduce the coding
/ designing (ie other than ArrayList or some generic collection). Should
this be done with SAX and an in-memory XML object (no file needed, and would
slow things down)? Should I create a collection that loads itself from a
ResultSet including metadata and can sort by a particular column, set of
columns? I know how I would do it in Delphi, but need some insight into
various java solutions.
Thanks,
Tom Dyess
OraclePower.com
with my strategy. This is for the oraclepower.com website.
BACKGROUND:
I have a table of links that I need to match up with keywords the user
enters. If the user enters the keywords "oracle" and "reports" I query the
database for all link titles and descriptions that exist in the table
something like this
SELECT col1..coln
FROM LINK_LIST
WHERE title like '%keyword%' or subject like '%keyword%'
I then pull the recordset into what is called a client data set (Delphi),
which is a
recordset "in memory" instead of one directly attached to a database or XML
file. I
then use an algorithm to weight each result based on where and how many
times it appears in title and link, then sort by weight, then display the
resource to the web page.
QUESTION:
Do the java libraries have an object that can easily be loaded from a
ResultSet, have a weight column added to it then sort itself, then examine
the columns from the memory object; or do I have to create this object
myself?
If I have to create this myself, what objects will help me reduce the coding
/ designing (ie other than ArrayList or some generic collection). Should
this be done with SAX and an in-memory XML object (no file needed, and would
slow things down)? Should I create a collection that loads itself from a
ResultSet including metadata and can sort by a particular column, set of
columns? I know how I would do it in Delphi, but need some insight into
various java solutions.
Thanks,
Tom Dyess
OraclePower.com