Re: searching and sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian A. Anderson wrote:
> I am new(relatively) to php programing and searching. I am trying to
> understand the best way to access data and deliver results to searches on
> a
> product catalog website.
>
> I have two kinds of data that I am sorting and displaying results for. The
> first is info about specific products, and the other is text based general
> information, notes, and specials that will be stored in a database as
> well.
>
> My question is what is the best way to format and sort all of this info
> before results delivery.
>
> I am thinking of incrementally adding the resultant hits into two
> associative arrays with the link to the data and a calculated relevance
> value, and sorting this array by these relevences. One array would be for
> text data links and another would be for catalog item links. If I have two
> arrays(sorted), than I could display them like Amazon.com does with
> products
> in the main display area(with pictures), and text links to the side.
>
> Am I thinking of an efficient way to go about this, or not? I wonder if
> anyone has more experience, or some suggested resources in understanding
> building good search building? I would like to find such a book or
> resource
> that maps out good search and results procedures.

Unless you KNOW your site will get loads of traffic from the get-go, I'd
focus more on the SIMPLE solutions that you can maintain as a beginner.

While you can find all kinds of nifty explanations of very slick and fancy
systems, those are often written and maintained by an army of
programmers...

Also depending on the size and scale and scope of your data, I'm not sure
that two separate lists is a Good Idea.

Amazon may need it for, their zillion items they sell, but do you, really?

I've spent *DAYS* writing special search engines for data-sets that only
had 100 items in them, and would never grow significantly larger than
that.  I told my client that was pretty wasteful of their money, but
that's what they wanted. [shrug]  Pays the bills.  But that doesn't mean
you want to waste your money/time that way.

One Axiom: Keep as much of the scoring/sorting in your SQL as possible --
That's what SQL engines are best at.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux