[ 
https://issues.apache.org/jira/browse/LUCENE-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492483#comment-16492483
 ] 

Simon Willnauer commented on LUCENE-8335:
-----------------------------------------

> i dont think lucene needs to enforce this. from my perspective its just a 
>docvalues field. given that lucene doesnt even know the difference between a 
>integer amd a rloat field, i dont think it should be tracking expert shit for 
>elasticsearch.

my reasoning here is that in-turn to make this a more widely useable feature 
ie. [~mikemccand] indicated he want's to use it and I suspect the usecase is 
becoming more widely adopted we can be more strict about it and make it a 
non-expert feature. The fact that it's just a DV field is great and under the 
hood not many changes were necessary. The overhead of tracking this is small in 
my opinion and enforcing this would allow us to make the feature much less 
trappy down the road. ie. factory methods can automatically wrap indices that 
have a soft-deletes field, we can track the numSoftDeletes which helps a ton 
with assertions and allows to pull index stats by reading seginfos alone 
without opening a reader. I can work around all these thing and I am not even 
convinced we should do automatically wrapping a reader etc. but we can make 
this feature easy to use with a simple setter on IWC. From a interface 
perspective it's simple and the changes necessary to make it way less trappy 
warrent the change. I wonder what others think.

> Do not allow changing soft-deletes field
> ----------------------------------------
>
>                 Key: LUCENE-8335
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8335
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 7.4, master (8.0)
>            Reporter: Nhat Nguyen
>            Assignee: Simon Willnauer
>            Priority: Minor
>         Attachments: LUCENE-8335.patch
>
>
> Today we do not enforce an index to use a single soft-deletes field. A user 
> can create an index with one soft-deletes field then open an IW with another 
> field or add an index with a different soft-deletes field. This should not be 
> allowed and reported the error to users as soon as possible.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to