doco
doco copied to clipboard
Id is not required for a Document. The search service can automatically create an identifier
Setting the document identifer is optional. If omitted, the search service will create an identifier.
Any updates on this ? This would block us.
I'd argue that setting ID is rather useful. Could you explain your scenario a little?
Also, if you really don't want a meaningful id then you can work around by not annotating any field with @DocumentId and passing a UUID while creating document. e.g.
Document myDoc = doco.toDocument(myEntity, "some-random-id-here");
Yes, the uuid approach is sufficient. What I wasn't sure of is whether there is a way to specify document id (without requiring an annotation).