[
https://issues.apache.org/jira/browse/LUCENE-3186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116330#comment-13116330
]
Simon Willnauer commented on LUCENE-3186:
-----------------------------------------
This issue still remains and we need to solve this in order to move forward
towards 4.0. Yet, I am still banging my head against the wall about how to
really fix this.
Promoting up values that are compatible should be doable like Int_32 and Int_8
should be promoted to Int_32 likewise for float & double. Regarding byte values
this is kind of tricky. Var length vs Fixed length is still doable but what if
something is sorted. I don't think we should promote something to sorted in any
case. The problem here is not just merging but also reading, I can not pull a
sorted source from a non-sorted DV field which would cause confusion on the
user level.
I think we should compromise here and try to promote what we can like Ints,
Floats and unsorted bytes (incompatible can go to variable length simply) and
for Sorted if something is not sorted we should just drop the entire field.
SortedVar & SortedFixed can be promoted to SortedVar and everything should be
fine IMO.
One other idea would be removing the flexibility to set the actual type on the
user level and decide at indexing time to use var vs. fixed and straight vs.
deref and move the sorting decision to the codec ie. if you want to sort then
your codec needs to provide sorting otherwise its not sorted. We could then
treat everything as bytes and convert at load time. Like you say getSource(Int
| Float | Bytes) and the codec decides how to convert each value to a float /
int / byte and fails if not possible?
> DocValues type should be recored in FNX file to early fail if user specifies
> incompatible type
> ----------------------------------------------------------------------------------------------
>
> Key: LUCENE-3186
> URL: https://issues.apache.org/jira/browse/LUCENE-3186
> Project: Lucene - Java
> Issue Type: Improvement
> Components: core/index
> Affects Versions: 4.0
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Fix For: 4.0
>
>
> Currently segment merger fails if the docvalues type is not compatible across
> segments. We already catch this problem if somebody changes the values type
> for a field within one segment but not across segments. in order to do that
> we should record the type in the fnx fiel alone with the field numbers.
> I marked this 4.0 since it should not block the landing on trunk
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]