moqui-framework icon indicating copy to clipboard operation
moqui-framework copied to clipboard

getDataDocuments in EntityDataDocument.groovy

Open lightning-pro opened this issue 6 years ago • 1 comments

Hi I want to index the document to ES with lots of data saying that 1 billion, when using the ec.service.sync().name("org.moqui.search.SearchServices.index#DataDocuments").parameter("documentList", documentList).call() it will encouter OOM after a few minitues due to the list is not realse the memory I guess.So I copy the code and manage the list and object by myselft. it works perfect when my primary key is String. but due to some reasonse of my db sharding proxy, we have to chagne the primary key to number-integer. this chagnes will led to the getDataDocuments("myDocumentId", condition, null, null) return the result is not what I want because of no order by my primary key.

any consideration or necessary to add a parameter like List<String> orderByFieldNames ? if not ,I will do it by myseft

lightning-pro avatar Dec 07 '19 09:12 lightning-pro

I'm not sure how to respond to or comment on this, too many details missing.

You mentioned "we have to chagne the primary key to number-integer", which primary key and how is that an issue? What does that have to do with "not what I want because of no order by my primary key"? Sorry, but I'm not even sure what it is that you want to sort by primary key.

You mentioned "add a parameter like List orderByFieldNames", but to what or where?

jonesde avatar Dec 08 '19 05:12 jonesde