www.webdeveloper.com
Results 1 to 10 of 10

Thread: HELP needed... How to do Indexing on searches only on Document Title

  1. #1
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    16

    HELP needed... How to do Indexing on searches only on Document Title

    Hi..,
    I'm running my server on Win 2000 Server. I'm having difficulties in indexing my knowledge base articles to only search based on the document title.
    For example when i key in to search articles relating to Microsoft Words... other articles without the keywords are also shown in the list. Thus creating a long list of irrelavant articles. I have attached the document that does the search and below is the abstract that searches the articles.
    Anyone out there who knows how to go around this... Please HELP.. Thank you

    sub SetQueryAndUtilObjectsProperties(byref tobjQuery, byref tobjUtility, _
    tstrFileTypes, tstrQueryProperty, tstrSearchString, tstrFormScope)
    Dim strCompSearch

    'set the target search property (all text, keywords only, etc)
    'take out the noise word "not"
    if Instr(1,tstrSearchString,"not")>0 then
    strCompSearch = " (#filename " & tstrFileTypes & ") AND (" & tstrQueryProperty & replace(tstrSearchString, "not", "") & ")"
    else
    strCompSearch = " (#filename " & tstrFileTypes & ") AND (" & tstrQueryProperty & tstrSearchString & ")"
    end if
    tobjQuery.Query = strCompSearch
    tobjQuery.SortBy = "vpath[a]"
    tobjQuery.Columns = "DocTitle, vpath, filename, size, write, characterization, rank"
    tobjQuery.MaxRecords = 300
    tobjQuery.Catalog = "web"
    tobjQuery.LocaleID = GetLocale()
    SetScopeForQuery tobjQuery, tobjUtility, tstrFormScope
    end sub
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    16
    Is there anyone out there who could help me on this? Please... I need this fixed soon. Thank you.

  3. #3
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    16
    Why?? Why?? is there no one out there who could help me?? I'm gonna be fried soon.... Please...

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Please, thread-bumping is not allowed.

    You need to use ampersands (&) for string concatenation instead of AND.

    If somebody figures out an answer for you, they will post.

    Regards,
    Andrew Buntine.

  5. #5
    Join Date
    Nov 2003
    Posts
    655
    Originally posted by buntine
    Please, thread-bumping is not allowed.

    You need to use ampersands (&) for string concatenation instead of AND.

    If somebody figures out an answer for you, they will post.

    Regards,
    Andrew Buntine.
    The AND is inside a string and is part of the query.

    I don't do this sort of thing, but from what I looked up, it seems that you need to indicate that your search term should be in the DocTitle:

    ...
    WHERE CONTAINS(DocTitle,"[the string searched for]")

  6. #6
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    16
    hammer/buntine,
    I've tried the methods mention.. but still in a stuck. Here's 2 more files that are related to the search. hope it helps. Really in a blur now with this.
    The newissue.asp file is where the search form is placed. And the solutions.asp is where the result will be posted. Hope there is some one out there who could shed some light on me. Thanks...
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    The AND is inside a string and is part of the query
    Your right. It looked like the string was bring terminated before AND.

  8. #8
    Join Date
    Nov 2003
    Posts
    655
    Perhaps
    strQueryPropertyXXX = "$contents "
    should be
    strQueryPropertyXXX = "$DocTitle "

    If you make the above change and it still doesn't work, response.write objQuery.Query so you can what the query you're making is so you can see whether what you're asking for is what you thought you were asking for. Then figure out how you need to change the query to get what you need.

  9. #9
    Join Date
    Dec 2003
    Location
    Malaysia
    Posts
    16
    CARDBOARDHAMMER!!!...
    You've SAVED me again.. THANK YOU SO VERY MUCH.... Cheers mate... This is wot happens after so much codings.. ur eyes and brains just becomes blur. Thank you Thank you...

  10. #10
    Join Date
    Nov 2003
    Posts
    655
    You're welcome

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles