-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add updateDocuments API which accept a query #12341
Conversation
To me this looks fine, although I wonder why we needed a new |
This reverts commit 52ab167.
Sorry I pressed merge on wrong PR, so I reverted this. Can you reopen this? |
Of course you can also revert the revert, if that's applicable. The change looks fine to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I left a couple minor comments. Thanks @zhaih.
if (random().nextBoolean()) { | ||
writer.updateDocuments(new Term("id", id), Arrays.asList(doc, doc)); | ||
} else { | ||
writer.updateDocuments( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also do this randomness in RandomIndexWriter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added to it, not sure whether that's the place in your mind?
@uschindler We previously have a |
For some reason I cannot reopen this one, so I opened a new one #12346 |
Description
Essentially just wire up
updateDocuments(Query, Iterable<Document>)
API, we could probably also addupdateDocument
for single document update, but I don't see a good reason to add that (except for completion) yet.