GCRC / nunaliit

Nunaliit Atlas Framework
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

Date Indexing Rework #1074

Open ahayes opened 2 years ago

ahayes commented 2 years ago

The current date indexing system involving the creation and maintenance of a org.nunaliit.date_clusters document and couchdb date-index view is falling over when the number of documents containing nunaliit date objects gets high (~20,000+).

This issue is to track an evaluation and redesign effort.

billingb commented 1 year ago

After investigating the code it appears that the servlet and this table are used for searching dates from the search (magnifying glass) and no where else that I can find.

https://github.com/GCRC/nunaliit/blob/a43114963a762d865969f9d4428b10c0c731b28f/nunaliit2-js/src/main/js/nunaliit2/n2.couchSearch.js#L440

ahayes commented 1 year ago

Thanks @billingb. Any thoughts on how to refactor to avoid requiring this enormously deep JSON document while keeping the functionality? I imagine that the function may also be used by some atlases within custom timeline widget code.

One possibility might be to revisit search now that we are on CouchDB 2.x. I believe there is more there now than there was when the original search index views and code were written.

billingb commented 1 year ago

I checked the custom timeline code I could find and didn't see any network calls for the date servlet. It is possible I'm missing them but I couldn't find them. I think the timeline widget does the filtering browser side.

I'm looking into the JSON document (which is really a serialized tree). It seems to produce a view and I'm looking to see how else we can do that.