No, Lucene does not store numeric type nor multi-valued-ness today;
it's frustrating.

In LUCENE-6005 branch I'm exploring fixing that, and it's going well,
but there are many challenges/nocommits.

In the meantime, maybe you could model your tool after
UninvertingReader?  It faces the same issue (lack of schema) and lets
the user specify the type.

Also, see (the confusingly named) TestDemoParallelLeafReader?  It lets
you partially reindex, e.g. derive new indexed fields or DV fields,
etc., from existing stored/DV fields, in an NRT manner.



Mike McCandless

http://blog.mikemccandless.com


On Wed, Dec 10, 2014 at 9:12 AM, Toke Eskildsen <[email protected]> 
wrote:
> I am attempting to write some code for removing or adding DocValues for
> an existing Lucene index: https://github.com/netarchivesuite/dvenabler
> I have a proof of concept running, but it is not very user friendly.
>
> Ideally the user should be presented with a list of fields and simply
> select which ones should have DocValues. However, in order to do so, I
> need to determine is a NumericField was indexed as INT, LONG, FLOAT or
> DOUBLE.
>
> That information is present in FieldType at index time, but I cannot
> figure out if it is possible to extract it from an existing index?
> If it not possible to determine with certainty, I could use a way of
> performing a best-guess.
>
> On a similar note, does Lucene have a concept of single and multi-value
> stored fields or do I have to infer that by iterating all the documents
> and check each one?
>
> - Toke Eskildsen, State and University Library, Denmark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to