Actually, after further investigation this does look like a
bug/limitation.
The TVF returns the string correctly when the wilcard is applied to
more
of the string.
ie.
......db2ext.textsearch("LMA101%"..........) - finds the part (as
only 2 records match)
......db2ext.textsearch("LMA10%"..........) - finds the part (as
only 2 records match)
......db2ext.textsearch("LMA1%"..........) - finds the part (as only
2 records match).
......db2ext.textsearch("LMA%"..........) - finds the part (as only
2 records match)
......db2ext.textsearch("LM%"..........) - DOESN'T find/include the
part (as 6888 match)
only 1417 of the 6888 matching records are returned, with no error
message!
It appears that maybe there is some limit on the number of records
that can
be returned ??
NB. I actually started using a result limit of 0 rather than the 500
shown
in my previous append.
Any comments would be great, as we are investigating the feasibility
of
using NSE and currently this is a show stopper to going any further
with it.
Many thanks.
Paul.
pa**@abacus.co.uk (Paul Reddin) wrote in message news:<1f**************************@posting.google. com>...
Hi,
We are trying to perform a very straightforward search but when we
compare it to a standard SQL LIKE the result set is wrong ???
e.g
select p.oid, p.part_number
from jabs.part as p
where
p.part_number like 'LM%'
;
Finds a part_number (amongst others) of 'LMA1010GMB-40'
the 'equivalent' TEXT search (with index built) of the same Table
doesn't ?????
i.e
select p.oid, p.part_number
from jabs.part as p,
TABLE(db2ext.textsearch('"LM%"','DB2EXT','PART_PAR T_NUMBER_IX',0,500,cast(NULL
as bigint))) t
where
t.PrimKey = p.oid
;
Are we misusing the % wild-card in some way ?
are we correct in assuming t.primkey is derived automatically from the
definition of the table i.e p.oid ?
This just seems too fundamental to be a bug.
Any help appreciated.
Paul.