Inconsistent behavior between VString and VText for Indexed by Word search

Ernesto Giannotta erne at apimac.com
Fri Aug 12 10:11:01 CDT 2011


Hello Ivan,

a bizarre difference in search behavior (verified in latest VStudio 4.9).

When a field is marked as Indexed and Indexed by Words, 
performing a LIKE search for a dash '-' (or any other symbol like '>') behaves differently in VText and VString.

It finds it in VText but not in VString.

Example:

Have a table with VString, VVarChar and VText all Indexed and Indexed by Words
Fill it with some records and put a string like 'dash-it' in them
Run this select:

select * from Dashes
where Fld_Text like '%-%'
or Fld_VarChar like '%-%'
or Fld_String Like '%-%'

finds 'dash-it' in Fld_Text but not in other fields.

If I remove either the Indexed or Indexed by Words flag from VString and VVarChar all 'dash-it' inside them are found.

Now I guess that dashes and other symbols are ignored in Indexed by Words search because they're used as word separators.
In fact:

select * from Dashes
where Fld_Text = '-'

finds nothing.

So the question is, is Vale taking advantage of the index for LIKE searches in VString but not in VText?
I'd rather expect the opposite...

Is this by design?


Cool Runnings,
Erne.



More information about the Valentina mailing list