Wednesday, March 7, 2012

Issue with full-text query (containstable)..

I've got a full-text index on a table 'items' with an image field
'item' into which I've imported word and pdf documents. I've only got
~10 docs imported currently, for testing. I know that each of these
documents, except for one, includes the term 'ontology' or
'ontologies'.
I've got the following query, which gives back only two of these
documents (1 word, 1 pdf):
select i.*, ct.rank as incl_ctr
from items i inner join
containstable(items, item,
' ("class*" and "info*") or "ontology" '
) ct on i.id = ct.[key]
where (ct.rank > 1) and i.incl_ext in ('.doc','.pdf')
order by ct.rank desc;
I know this is incomplete, based on the content of each document, which
is an issue I'd like to work out; but prior to that, if I write the
query with "onto*" as a prefix term instead of "ontology", it only
gives back one of the two docs (the pdf):
select i.*, ct.rank as incl_ctr
from items i inner join
containstable(items, item,
' ("class*" and "info*") or "onto*" '
) ct on i.id = ct.[key]
where (ct.rank > 1) and i.incl_ext in ('.doc','.pdf')
order by ct.rank desc;
I can't identify why this is. I'd be very interested in whatever input
I could get on this..
Installed evaluation version: 2000 - 8.00.194 on Windows XP.
Installing the pdf ifilter improves the circumstance described in the
initial post; yet I think it's odd that onto* yields fewer docs in that
query than ontology, which continues to be the case..

No comments:

Post a Comment