Question

The Oracle Text Reference 10g states that when we index our table using multi-column datastore, the system concatenates the text columns, tagging the column text, and indexes the text as a virtual XML document for each row.

Also, in certain situations, we can use user datastore to define stored procedures that synthesize documents during indexing. The procedure can grab the data and put them in an XML format. A good example is shown here.

The Question

Is there a way to retrieve or display the underlying virtual XML document for each record? How?

Was it helpful?

Solution

Probably not

The view that may display native stored compiled indexes is CTX_INDEX_VALUES Or CTX_USER_INDEX_VALUES (depending on permissions and querying user). However, given that the index value length is only 500 characters, it is unlikely that it is stored there. (Just start selecting randomly from those indexes, if it exists, it will likely be there.)

Looking at the view design, however, it is unlikely that those virtual XML elements are stored, as it's much easier to compile them on the fly and then load them into memory.

Alternatively, CTX_DOC has a number of markup functions, but none indicate the ability to access native XML.

You may also want to explore the discussion around metalink: 122255.1 (Unfortunately, I don't currently have metalink access).

It may be easier to write your own parser-to-XML (as oracle has quite a few excellent native XML functions) than try to hack around the full text index.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top