lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-5680) Allow updating multiple DocValues fields atomically
Date Tue, 20 May 2014 08:29:38 GMT


Shai Erera commented on LUCENE-5680:

Well, first updateNumeric/BinaryDV() allows you to unset a value, and I think we should preserve
that capability here. As for unsetting, this could be very useful e.g. for a "onsale" boolean
field or the "saleprice" etc. I think you proposed the "unset" capability while I was working
on LUCENE-5189, but I cannot find the reference :).

I agree we shouldn't bloat the API if unnecessary, and when I wrote the {{update(Term,Field...)}}
version it looked very simple and tests even passed. So I think this direction is promising,
but we should allow unsetting. Perhaps we can put somewhere a constant {{NumericDocValuesField
UNSET = ...}}? Maybe it can be on IndexWriter .. the thing is, we don't need it for e.g. Binary,
since they take a BytesRef and at least for now, allow passing a null value, but we can have
a similar UNSET constant for binary too.

> Allow updating multiple DocValues fields atomically
> ---------------------------------------------------
>                 Key: LUCENE-5680
>                 URL:
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>         Attachments: LUCENE-5680.patch, LUCENE-5680.patch
> This has come up on the list ( -- it would
be good if we can allow updating several doc-values fields, atomically. It will also improve/simplify
our tests, where today we index two fields, e.g. the field itself and a control field. In
some multi-threaded tests, since we cannot be sure which updates came through first, we limit
the test such that each thread updates a different set of fields, otherwise they will collide
and it will be hard to verify the index in the end.
> I was working on a patch and it looks pretty simple to do, will post a patch shortly.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message