Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Unanswered: full-text search and wildcard

    hello,

    i want to search for "any phrase here*" where i want it to match the exact same phrase and followed by anything. but the problem is that when using the following syntax: contains(myTbl,'"my phrase here*"') i will get results like "my123 phrases here" so the wildcard will be applied to the consecutive words and not the last word.

    How can i search for an exact phrase followed by anything?

    ps: i cant omit the wildcard becoz the last word is not exact

    so treating the space as any other character and not as a seperator in the search_expression may be a solution but how to do it

    Thanks
    samham

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Maybe this would work?

    where PATINDEX ( 'any phrase here%' , YourTextColumn) <> 0
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Sep 2003
    Posts
    522
    patindex has nothing to do with full-text search functionality

  4. #4
    Join Date
    Jan 2003
    Posts
    15
    thx blindman for the reply but as ms_sql_dba said this is not full-text search, using the full-text search functionality is a must

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I guess I don't understand why, if the full-text search logic is too fuzzy for your requirements, you can't use a normal character-string searching function.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jan 2003
    Posts
    15
    i wanted to make my search as fast as possible but it seems that full-text search is a wrong decision in my case becoz am searching in a column containing file Path which contains back slashes and back slashes r considered as white spaces while indexing so my search wont be accurate anyway.

    becoz the following 2 path will be the same if using fts:

    folder 1/folder 2
    and
    folder/1/folder 2

    so i'll give up using fts


Posting Permissions

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