It is about searching XML content in MarkLogic.
One of the fields has some double quote characters inside, which causes a problem for CSV export. It is decided to change the double quote to a single quote.
I used TDE with Optics API to perform the search. There are two ways to implement the above fix.
- Place the fn:replace in optics API part for query output.
- Place the fn:replace in TDE part when doing the indexing.
Both ways seem could solve the problem. However which is better and why? My gut feeling is that option 1 will make the query slow. In contrast, option 2 will make the data ingestion slow.