Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTSearch Query with Hyphen

Status
Not open for further replies.

Rofeu

Technical User
Apr 13, 2005
500
NL
Hi,

I'm doing an FTSearch on a view. The query-string I'm looking for might contain a hyphen. The problem I'm having is as follows:

"06-0*" works fine
"06*" also works fine, but
"06-*" doesn't return anything.

How do compile my search-string so it'll pick up the documents that contain "06-" followed by a variable string?

Any help is greatly appreciated.

Cheers,

Roel

Cheers,

Roel
 
First question : when you do the search manually, does it replicate these results ?
Second question : in your FTSearch code, do you place the search query elements in quotes (do you pass "06-", or '06-') ?

Pascal.
 
Hi,

first of all thanks for the reply.

If I do the search manually it won't even accept the wildcard *, if I enter 06- it returns all records that have 06- in it. (another issue as I only want records starting with 06-)

The string is compiled as follows:

StringVar1 & "*" & StringVar2

(with StringVar1 = "06-", StringVar2 is a NullString)

I've tried adding extra quotation marks at various points in my string.

Cheers,

Roel


Cheers,

Roel
 
Hi,

I discovered that it does return all docs containing "06-" if I take out the wildcard *, but in the end I need a string that will find all records starting with StringVar1 followed by a variable string and ending with StringVar2.

How can I do that without using the wildcards? I've already tried using the operator AND and & with all imaginable quotationmark placements, but nothing.

Can it be that it won't do more complicated searches because the database is not indexed?

Cheers,

Roel

Cheers,

Roel
 
Yikes ! Did you say the database is not indexed ?
There is no way an FTSearch can be reliable if the db is not indexed. Indexing is the primary requirement for FTSearch.
Please, please index your db and retry your searches.

Pascal.
 
hmm, thanks for that bit of info. Unfortunately I don't have the proper access to do that, but I'll see if I can find someone how does and try my search again.

Cheers,

Roel

Cheers,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top