[V4MD] Equivalent of V12's WordStarts operator?

Irv Kalb Irv at furrypants.com
Fri Sep 26 12:16:03 CDT 2008


Thanks very much Ruslan.  I'll give it a shot.

Irv

At 7:32 PM +0300 9/26/08, Ruslan Zasukhin wrote:
>On 9/26/08 7:09 PM, "Irv Kalb" <Irv at furrypants.com> wrote:
>
>Hi Irv,
>
>>  Here's my question for the day ...
>>
>>  I'm translating code from a V12 driven application to Valentina.  In
>>  implementing a big glossary search, I used V12's 'WordStarts'
>>  operator in a SELECT statement.  I'm looking to see if there is
>>  anything that is equivalent in the Valentina world.  Here's the
>>  definition of WordStarts from the V12 documentation:
>>
>>  ----------------------------------
>>  The "wordStarts" operator can be used only with fields of type string
>>  (including
>>  custom string types) with defined full-indexes.  It locates records
>>  that contain words
>>  that fully or partially match the value specified to mSetCriteria.
>>  Example:
>>  mSetCriteria(gTable, "description", "wordStarts", "ham")
>>  sets records for selection containing descriptions such as "Gigantic
>>  hamburger with
>>  fries" and "The greatest hammer in the world". It does not find
>>  records containing
>>  descriptions such as "Champion" or "Gotham City" because the words in these
>>  records don't start with the sub-string "ham".
>>  Since "wordStarts" operates on full-indexes, searching is performed
>>  very quickly.
>>  --------------------------------------------------
>>
>>  I see that there is a 'findStartsWith', but it looks like that refers
>>  to just the beginning of the field.  Is there any operator that will
>>  look through the entire contents of a field, looking for a match on
>>  the beginnings of ANY word in the field?
>
>1) to get this working you need field VarChar or TEXT to be marked as
>IndexByWords.  TEXT field actually is marked in this way on default.
>
>As result Valentina will build for field special index by words.
>
>
>2) Now searches as
>
>     WHERE left(fld,3) = 'ham'
>
>Will do what you want. Valentina will use index to find all WORDS that sart
>with ham.
>
>
>3) Also you can use
>     WHERE fld LIKE 'ham%'
>
>Valentina engine also will see that you want find START WITH strings,
>And self will use INDEX By Words if it exists.
>
>4) also exists RegEX way.
>
>     this is just very powerful way, it can be not indexed,
>     but you can define just any expression by complexity.
>    
>
>
>
>--
>Best regards,
>
>Ruslan Zasukhin
>VP Engineering and New Technology
>Paradigma Software, Inc
>
>Valentina - Joining Worlds of Information
>http://www.paradigmasoft.com
>
>[I feel the need: the need for speed]
>
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina


-- 

Multimedia R Us


More information about the Valentina mailing list