Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqldbaa
Starting Member
32 Posts |
Posted - 2009-09-02 : 10:06:38
|
| Hi ,Can anyone let me know how to do a Address search in Fulltext search.i have created fulltext catalog, index on a tableTable hasAdd_Num INTAddress VARCHARAdd_Num Address132 1/113 b/1 Rajiv Nagar North78 525 Washington Rd342 Serova Way 14456 10 Washington BlvdAddress field is fulltext indexed.Only using FREETEXT, im able to get the results, but i gives all probale results.I am not able to do with contains optionSELECT * FROM Addresses WHERE CONTAINS(Address,'"Washington Rd"')Should give me Add_Num Address78 525 Washington Rd456 10 Washington BlvdPlease help |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 10:09:52
|
| how would second result be returned as it doesnt contain Washington Blvd? |
 |
|
|
sqldbaa
Starting Member
32 Posts |
Posted - 2009-09-02 : 10:24:49
|
| Since the Address column is full text indexed , on full text searchingwith the condition WHERE CONTAINS(Address,'"Washington Rd"')the result should inculde all rows which has "Washington" or "Rd".That is why full text search option is used(to give probable matched)If suppose the table hasAdd_Num Address132 1/113 b/1 Rajiv Nagar North78 525 Washington Rd342 Serova Way 14456 10 Washington Blvd555 Washington St456 Serova Rdit should give result asAdd_Num Address78 525 Washington Rd456 10 Washington Blvd555 Washington St456 Serova RdSince the Address field has Alpha numeric characters the query is failing. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 10:27:16
|
| what about this?WHERE CONTAINS(Address,'"Washington"') |
 |
|
|
sqldbaa
Starting Member
32 Posts |
Posted - 2009-09-02 : 10:43:04
|
| WHERE CONTAINS(Address,'"Washington"')this worksBut '"Washington Rd"' comes as a parameter to the query. There many cases like this. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 10:50:22
|
| i cant understand how you expect it to return all strings containing washingdon alone to be returned when you're passing Washington Rd as value. |
 |
|
|
Dennis Falls
Starting Member
41 Posts |
Posted - 2009-09-03 : 12:19:21
|
| WHERE CONTAINS(Address, 'Washington or Rd') |
 |
|
|
|
|
|