to count the occurence of a particular word in search of an indexing database server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AquarianMermaid
    New Member
    • Sep 2010
    • 2

    to count the occurence of a particular word in search of an indexing database server

    how to count the occurence of a particular word in search of an indexing database server
  • AquarianMermaid
    New Member
    • Sep 2010
    • 2

    #2
    hi,
    i am trying to query the indexing database server. in the serach i type a word for eg. "now" , so i need the result set to be ordered in a way that the document which has maxOccurrence of "now" is returned first and the rest documents later. that is, they should be ordered from ""maxOccure nce" to "minOccuren ce"

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      I wish you could just do it in the SQL, but failing that, you will need to do it programmaticall y.
      1- search the db so you are getting the set of every record with that string
      2- send each to a function that counts ( I would use the instr() function in a loop)
      3- sort the list according to that count
      That said, ASP won't do a good job of that unless you are getting ~10 hits from the db query.

      Jared

      Comment

      Working...