Re: Search within a search result !!!
nospam_at_geniegate.com
Date: 05/03/04
- Next message: nospam_at_geniegate.com: "Re: An implementation of the Model-View-Controller pattern in PHP"
- Previous message: Bre-x: "Slow PHP on IIS 6"
- In reply to: Jay: "Search within a search result !!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 03 May 2004 03:34:39 GMT
Jay <artlover70@yahoo.com> wrote:
> Hi everybody !
>
> I have questions about "searching".
>
> I saw some of the websites such as "google" , "microsoft"...provide
> the user the option to "search within the search result". What is the
> principle behind this ?
>
> What really happen behind scene ? (the database query, database
> structure....)
As the previous poster pointed out, they use typicaly AND your new terms
with the previous ones giving the illusion of filtering. AND is
probably the best way to go about it.
It depends on the implementation and scale, If you are *scanning* then
saving the results might be faster, a kind of "query ID", you could use
the query ID as a key in a result table and limit your new query to rows
joined with the ID's in the prior table. This can kind of suck because
the database needs to maintain indices on the QID, which results in
slower insertion times. (And an insert is required for each "hit") BUT
it has a huge advantage in that you can join on it, which is something
you couldn't do with a text file.
If you're still scanning within the results, might be fastest to cache
the results in local text file(s) (Probably ISAM so you can skip to page
15..). But it all depends on the implementation, what it is exactly
you're looking at (If each "row" is an entire text file... might be a bad
idea) and available resources.
Jamie
-- http://www.geniegate.com Custom web programming User Management Solutions Perl / PHP / Java / UNIX
- Next message: nospam_at_geniegate.com: "Re: An implementation of the Model-View-Controller pattern in PHP"
- Previous message: Bre-x: "Slow PHP on IIS 6"
- In reply to: Jay: "Search within a search result !!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|