Jason,

Hope I'm not stating the bleeding obvious, but why don't you use Verity?

Verity will return you a summary as part of the search result record set as
default.  No effort required. It returns the contents of the automatic
summary generated by cfindex. The default summarization selects the best
three matching sentences, up to a maximum of 500 characters.
(He says plagiarising the CF Docs)

Regards

Stephen

----- Original Message -----
From: "Jason Davis" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 9:23 PM
Subject: Experts Only! - Summarizing Results


> I'm running a full text search on my Product table using MSSearch
> service.
>
> Query looks something like this:
>
> SELECT Product_title,Product_description
> FROM Products
> WHERE CONTAINS (*,'"#Query_filtered#"')
>
> Where Query_filtered is something similiar to "deskjet|printer|hp"
>
> Anyhow, in the end I'm recivng the entire Product_description (about 4K
> varchar)
> to output in <CFOUTPUT>, for every result - problem is - I want to
> display a
> summarize result (like google does) and NOT something simple as,
> a mid, with 100 characters to the left/right.
>
> I've thought of a mechanisem, but can't seem to code it - idea is to
> find the positions of each word start/end, increase those "markers" by
> |10|
> range (both sides) and assemble a 2-3 sentences, connected via "..."
>
> for example: 50-55, 60-63, 91-95
> would be: 40-65, 50-73, 81-105 and then:
> I can make a "long" sentence out of 40-73 (2 words are in the same
> range),
> then I add "..." and glue a sentence from 81 to 105.
>
> I will need to treat spaces in the end, also (not to cut into a word,
> just on
> spaces.. but that's another process..) - any help will be appriciated!
>
> Experts only? I think...
>
>
> 
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to