-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optional forestName parameter on DocumentManager.search() #1196
Comments
Hi Erik, just wondering do we need unit test for this? Thanks. |
That would be best. One possible approach:
|
Hi Ajit, I'm giving this one to you now. I added a unit test for one search method. |
@georgeajit , do you think the unit test provides sufficient coverage?
|
Added milestone. |
This task requires declaring a new interface method and passing a new parameter down the call path.
The expectation for this parameter arises from a similar search() overload in QueryManager:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/query/QueryManager.java#L286
The steps of this task:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/document/DocumentManager.java#L675
Provide JavaDoc for this new interface method by copying the JavaDoc for an existing search() overload and adding documentation for the forestName parameter that's equivalent to the documentation of the forestName parameter on the similar QueryManager.search() method.
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/DocumentManagerImpl.java#L517
Add the @OverRide implementation of the new search() overload method after the last existing @OverRide search() overload method and before the private search() method, returning the result of a call that passes all parameters through to the private search() method.
Modify all calls from the existing @OverRide search() overload methods to the private search() method to pass a final null value as the forestName parameter.
At current line 541, modify the call to getBulkDocuments() to pass the forestName parameter after the null value:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/DocumentManagerImpl.java#L541
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/RESTServices.java#L147
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L945
At current line 957, modify the call to getBulkDocumentsImpl() to add the forestName parameter as the last parameter:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L957
Modify the getBulkDocumentsImpl() method to add an additional String forestName parameter as the last parameter:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L1065
At current line 1093, replace the final null value with the forestName parameter:
https://github.com/marklogic/java-client-api/blob/develop/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java#L1093
The text was updated successfully, but these errors were encountered: