Getting the Doc ID in Lucene
问题 In lucene, I can do the following doc.GetField("mycustomfield").StringValue(); This retrieves the value of a column in an index's document. My question, for the same 'doc' , is there a way to get the Doc. Id ? Luke displays it hence there must be a way to figure this out. I need it to delete documents on updates. I scoured the docs but have not found the term to use in GetField or if there already is another method. 回答1: Turns out you have to do this: var hits = searcher.Search(query); var