Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> how to: get the multiple query, word location. which column?
I used ctx_ddl.set_attribute('ctxsys.my_multi', 'columns', 'title,
objective, scope,approach'); to set the multiple column index. I then
created the index doing this..
SQL>create index idx_all
on project(ctx_dummy)
indextype is ctxsys.context
parameters ('datastore ctxsys.my_multi')
/
i then am able to query all for columns, example..
SQL> select score(1) score, projectid from project where contains(ctx_dummy, 'research', 1) >0 order by score desc;
the query looks like this, which is ok... but..
SCORE PROJECTID
-------- ----------
78 1380 58 2332 58 133 52 1142 45 2055 39 2084 39 40 32 1748 32 259 32 255 26 607
SCORE PROJECTID
-------- ----------
26 138 26 72 26 79 19 2053 19 16 19 68 19 1924 19 1734
But i also need to have the query give me the column it found the word, i queried for.
Example of desired output..
SCORE PROJECTID COLUMN
-------- ---------- ----------
26 138 objectives 26 72 scope 26 79 objectives 19 2053 title 19 16 title 19 68 objectives 19 1924 approach 19 1734 scope
Any ideas will help.
Thanks inadvance,
Jimmie
Received on Tue Jul 26 2005 - 13:36:53 CDT