sinequa / sba-angular

Sinequa's Angular-based Search Based Application (SBA) Framework
https://sinequa.github.io/sba-angular/
MIT License
30 stars 25 forks source link

How can we customize export of documents to include non-column related data? #24

Closed Guillaume-Developer closed 3 years ago

Guillaume-Developer commented 3 years ago

Recently, we've been trying to add the search performed (text search + filters) to the export file obtained when downloading the documents' metadata. Unfortunately, we've come to realize that this endeavor was not possible due to the fact that the download file is prepared in the backend, and only the final file ready for download is sent back to the frontend. We thought that we could intercept the file before it being downloaded and change the filename through the header 'content-disposition' but it was unsuccessful.

Do you have any idea how this could be implemented with the existing export query component or is this something that we would need to create a new component to implement?

ericleib commented 3 years ago

Hi Guillaume, The front-end is probably the easy part. You could modify the existing component to your needs. The difficulty is that there is currently no way to customize the backend for the export query... Perhaps you could implement your own export endpoint via plugin?

Guillaume-Developer commented 3 years ago

Hi Eric, I understand, I'll talk to my team and see what we decide to do. I'll close this issue for now since your message is answering my question. Thanks!