Lucene - Core
  1. Lucene - Core
  2. LUCENE-5801

Resurrect org.apache.lucene.facet.util.OrdinalMappingAtomicReader

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.7
    • Fix Version/s: 4.10, Trunk
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      from lucene > 4.6.1 the class:
      org.apache.lucene.facet.util.OrdinalMappingAtomicReader

      was removed; resurrect it because used merging indexes related to merged taxonomies.

      1. LUCENE-5801.patch
        3 kB
        Shai Erera
      2. LUCENE-5801.patch
        7 kB
        Shai Erera
      3. LUCENE-5801.patch
        15 kB
        Shai Erera
      4. LUCENE-5801_2.patch
        14 kB
        Nicola Buso
      5. LUCENE-5801_1.patch
        14 kB
        Nicola Buso
      6. LUCENE-5801.patch
        16 kB
        Nicola Buso

        Activity

        Hide
        Shai Erera added a comment -

        Thanks for opening this, we definitely need to bring this class back. While you're at it, notice that there is a matching test as well as TaxonomyMergeUtils which did some work for the user ... we should consider returning them as well, but this time under o.a.l.facet.taxonomy.utils, as they are specific to the taxonomy index.

        I think one change we should make is somehow expose FacetsConfig.dedupAndEncode as a static method, so you can encode the new ordinals and then:

        • Take an OrdinalsReader in the ctor (optional, 2nd ctor) in case the app used custom encoding (default to DocValuesOrdinalsReader).
        • Have a protected method dedupAndEncode, like FacetsConfig, default to FacetsConfig.dedupAndEncode and allow the app to override with its own custom encoding.
        Show
        Shai Erera added a comment - Thanks for opening this, we definitely need to bring this class back. While you're at it, notice that there is a matching test as well as TaxonomyMergeUtils which did some work for the user ... we should consider returning them as well, but this time under o.a.l.facet.taxonomy.utils, as they are specific to the taxonomy index. I think one change we should make is somehow expose FacetsConfig.dedupAndEncode as a static method, so you can encode the new ordinals and then: Take an OrdinalsReader in the ctor (optional, 2nd ctor) in case the app used custom encoding (default to DocValuesOrdinalsReader). Have a protected method dedupAndEncode, like FacetsConfig, default to FacetsConfig.dedupAndEncode and allow the app to override with its own custom encoding.
        Hide
        Nicola Buso added a comment -

        Thanks Shai, I will follow you indications and later I will reintroduce also TaxonomyMergeUtils.

        Show
        Nicola Buso added a comment - Thanks Shai, I will follow you indications and later I will reintroduce also TaxonomyMergeUtils.
        Hide
        Nicola Buso added a comment -

        Simple patch to test it working

        Show
        Nicola Buso added a comment - Simple patch to test it working
        Hide
        Nicola Buso added a comment -

        Shai,

        if I accept an OrdinalsReader in ctor I would need later in:
        OrdinalMappingAtomicReader.getBinaryDocValues(String field)

        to modify it to respect the parameter 'field' and currently DocValuesOrdinalsReader.field is private final.
        Let me know.

        Show
        Nicola Buso added a comment - Shai, if I accept an OrdinalsReader in ctor I would need later in: OrdinalMappingAtomicReader.getBinaryDocValues(String field) to modify it to respect the parameter 'field' and currently DocValuesOrdinalsReader.field is private final. Let me know.
        Hide
        Nicola Buso added a comment -

        public static FacetsConfig.dedupAndEncode(...)
        added methods to ovveride in case of different encoding

        Show
        Nicola Buso added a comment - public static FacetsConfig.dedupAndEncode(...) added methods to ovveride in case of different encoding
        Hide
        Shai Erera added a comment - - edited

        I will review the patch later, but a static method cannot be overridable by sub-classes, so we still need the protected method, with the default impl delegating to a static utility method...

        Show
        Shai Erera added a comment - - edited I will review the patch later, but a static method cannot be overridable by sub-classes, so we still need the protected method, with the default impl delegating to a static utility method...
        Hide
        Nicola Buso added a comment -

        You are right Shai, I think while there is an abstraction for the decode part of the values, it's missing the encode abstraction.

        Show
        Nicola Buso added a comment - You are right Shai, I think while there is an abstraction for the decode part of the values, it's missing the encode abstraction.
        Hide
        Shai Erera added a comment -

        FacetsConfig.dedupAndEncode is the encode abstraction. The decode abstraction is in the OrdinalsReader. Previously these were encapsulated in an Encoder/Decoder interfaces, but since this added another API (sometimes confusing) and custom encoding of category ordinals is extremely expert, I think the current abstractions are fine.

        Show
        Shai Erera added a comment - FacetsConfig.dedupAndEncode is the encode abstraction. The decode abstraction is in the OrdinalsReader. Previously these were encapsulated in an Encoder/Decoder interfaces, but since this added another API (sometimes confusing) and custom encoding of category ordinals is extremely expert, I think the current abstractions are fine.
        Hide
        Nicola Buso added a comment -

        Than would you prefer to have a o.a.l.f.t.utils.DefaultEncoding with a static method called both by FacetsConfig.dedup.. and OrdinalMappingAtomicReader?

        Show
        Nicola Buso added a comment - Than would you prefer to have a o.a.l.f.t.utils.DefaultEncoding with a static method called both by FacetsConfig.dedup.. and OrdinalMappingAtomicReader?
        Hide
        Shai Erera added a comment -

        Hmm, I thought about it, maybe we don't need the static method at all. OrdinalMappingAtomicReader.dedupAndEncode() will use a FacetsConfig private extension which exposes its dedupAndEncode()? Yes, this isn't what FacetsConfig is for, but I think it's better than exposing a public static method.. would you mind giving it a try?

        Show
        Shai Erera added a comment - Hmm, I thought about it, maybe we don't need the static method at all. OrdinalMappingAtomicReader.dedupAndEncode() will use a FacetsConfig private extension which exposes its dedupAndEncode()? Yes, this isn't what FacetsConfig is for, but I think it's better than exposing a public static method.. would you mind giving it a try?
        Hide
        Nicola Buso added a comment -

        Sure Shai, this is the patch

        LUCENE-5801_2.patch: reverted FacetsConfig, added FacetsConfig inner extension in OrdinalMappingAtomicReader

        Show
        Nicola Buso added a comment - Sure Shai, this is the patch LUCENE-5801 _2.patch: reverted FacetsConfig, added FacetsConfig inner extension in OrdinalMappingAtomicReader
        Hide
        Shai Erera added a comment -

        Thanks Nicola. I updated the patch with a CHANGES entry. Also, I fixed the DocValues class to not call ordsReader.getReader() for every document. I will run tests and commit shortly.

        Show
        Shai Erera added a comment - Thanks Nicola. I updated the patch with a CHANGES entry. Also, I fixed the DocValues class to not call ordsReader.getReader() for every document. I will run tests and commit shortly.
        Hide
        ASF subversion and git services added a comment -

        Commit 1607582 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1607582 ]

        LUCENE-5801: add back OrdinalMappingAtomicReader

        Show
        ASF subversion and git services added a comment - Commit 1607582 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1607582 ] LUCENE-5801 : add back OrdinalMappingAtomicReader
        Hide
        ASF subversion and git services added a comment -

        Commit 1607585 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1607585 ]

        LUCENE-5801: move test under correct package

        Show
        ASF subversion and git services added a comment - Commit 1607585 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1607585 ] LUCENE-5801 : move test under correct package
        Hide
        ASF subversion and git services added a comment -

        Commit 1607586 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1607586 ]

        LUCENE-5801: add back OrdinalMappingAtomicReader

        Show
        ASF subversion and git services added a comment - Commit 1607586 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1607586 ] LUCENE-5801 : add back OrdinalMappingAtomicReader
        Hide
        Shai Erera added a comment -

        I moved the classes under the .taxonomy package, as it seemed silly to have a dedicated package for two classes. Committed to trunk and 4x.

        Thanks Nicola!

        Show
        Shai Erera added a comment - I moved the classes under the .taxonomy package, as it seemed silly to have a dedicated package for two classes. Committed to trunk and 4x. Thanks Nicola!
        Hide
        ASF subversion and git services added a comment -

        Commit 1607781 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1607781 ]

        LUCENE-5801: rename test vars, class and add missing ctor

        Show
        ASF subversion and git services added a comment - Commit 1607781 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1607781 ] LUCENE-5801 : rename test vars, class and add missing ctor
        Hide
        ASF subversion and git services added a comment -

        Commit 1607782 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1607782 ]

        LUCENE-5801: rename test vars, class and add missing ctor

        Show
        ASF subversion and git services added a comment - Commit 1607782 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1607782 ] LUCENE-5801 : rename test vars, class and add missing ctor
        Hide
        Littlestar added a comment -

        there is may be a java.lang.ArrayIndexOutOfBoundsException in this code.
        4.6.1 works well, but 4.9.0 works fail.
        why there only encode, no decode??

        java.lang.ArrayIndexOutOfBoundsException: 118
        at com.test.OrdinalMappingAtomicReader$OrdinalMappingBinaryDocValues.get(OrdinalMappingAtomicReader.java:100)
        at org.apache.lucene.codecs.DocValuesConsumer$2$1.setNext(DocValuesConsumer.java:263)
        at org.apache.lucene.codecs.DocValuesConsumer$2$1.hasNext(DocValuesConsumer.java:224)
        at org.apache.lucene.codecs.lucene49.Lucene49DocValuesConsumer.addBinaryField(Lucene49DocValuesConsumer.java:256)
        at org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsWriter.addBinaryField(PerFieldDocValuesFormat.java:112)
        at org.apache.lucene.codecs.DocValuesConsumer.mergeBinaryField(DocValuesConsumer.java:207)
        at org.apache.lucene.index.SegmentMerger.mergeDocValues(SegmentMerger.java:193)
        at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:122)
        at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2695)

        @SuppressWarnings("synthetic-access")
        @Override
        public BytesRef get(int docID) {
        try {
        // NOTE: this isn't quite koscher, because in general
        // multiple threads can call BinaryDV.get which would
        // then conflict on the single ordinals instance, but
        // because this impl is only used for merging, we know
        // only 1 thread calls us:
        ordsReader.get(docID, ordinals);

        // map the ordinals
        for (int i = 0; i < ordinals.length; i++)

        { ordinals.ints[i] = ordinalMap[ordinals.ints[i]]; //here is a ArrayIndexOutOfBoundsException }

        return encode(ordinals);
        } catch (IOException e)

        { throw new RuntimeException("error reading category ordinals for doc " + docID, e); }

        catch (Throwable e)

        { throw new RuntimeException("error reading category ordinals for doc " + docID, e); // these line only for breakpoint }

        }
        }

        ====
        ordinals
        ints (id=257)
        length 135
        offset 0
        [76 db 14d 18a 1bb 1de 241 2a7 315 352 387 3bf 3ee 424 458 48b 4be 4ed 523 558 5b9 5ea 61f 650 681 6e7 714 74b 780 7e1 842 86f 8a3 906 96b 99d 9ca a03 a39 a71 ad5 b02 b63 bc7 c29 c5d c8d cbe d1f d57 dba df2 e29 e61 e84 eed f53 fc1 ffe 1060 1095 10fa 115b 118f 11c7 11fd 122e 125b 1292 12f8 135b 138d 13ba 13ee 1451 1484 14b4 14e1 1543 1579 15db 163f 166c 16a5 170b 1744 1779 17de 1812 1847 187e 18b1 18e8 191d 1950 1973 19e2 1a48 1aae 1aeb 1b1b 1b3e 1baa 1c0f 1c7d 1cba 1ceb 1d1e 1d52 1d86 1db8 1ddb 1e3e 1eb0 1f13 1f50 1f81 1fb1 1fe9 2020 2059 208e 20c4 20f7 2128 215f 2182 21f5 225b 22d3 2310 233e 23a8 2418 247f]

        but "ordinalMap.length" only 10

        Show
        Littlestar added a comment - there is may be a java.lang.ArrayIndexOutOfBoundsException in this code. 4.6.1 works well, but 4.9.0 works fail. why there only encode, no decode?? java.lang.ArrayIndexOutOfBoundsException: 118 at com.test.OrdinalMappingAtomicReader$OrdinalMappingBinaryDocValues.get(OrdinalMappingAtomicReader.java:100) at org.apache.lucene.codecs.DocValuesConsumer$2$1.setNext(DocValuesConsumer.java:263) at org.apache.lucene.codecs.DocValuesConsumer$2$1.hasNext(DocValuesConsumer.java:224) at org.apache.lucene.codecs.lucene49.Lucene49DocValuesConsumer.addBinaryField(Lucene49DocValuesConsumer.java:256) at org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsWriter.addBinaryField(PerFieldDocValuesFormat.java:112) at org.apache.lucene.codecs.DocValuesConsumer.mergeBinaryField(DocValuesConsumer.java:207) at org.apache.lucene.index.SegmentMerger.mergeDocValues(SegmentMerger.java:193) at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:122) at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2695) @SuppressWarnings("synthetic-access") @Override public BytesRef get(int docID) { try { // NOTE: this isn't quite koscher, because in general // multiple threads can call BinaryDV.get which would // then conflict on the single ordinals instance, but // because this impl is only used for merging, we know // only 1 thread calls us: ordsReader.get(docID, ordinals); // map the ordinals for (int i = 0; i < ordinals.length; i++) { ordinals.ints[i] = ordinalMap[ordinals.ints[i]]; //here is a ArrayIndexOutOfBoundsException } return encode(ordinals); } catch (IOException e) { throw new RuntimeException("error reading category ordinals for doc " + docID, e); } catch (Throwable e) { throw new RuntimeException("error reading category ordinals for doc " + docID, e); // these line only for breakpoint } } } ==== ordinals ints (id=257) length 135 offset 0 [76 db 14d 18a 1bb 1de 241 2a7 315 352 387 3bf 3ee 424 458 48b 4be 4ed 523 558 5b9 5ea 61f 650 681 6e7 714 74b 780 7e1 842 86f 8a3 906 96b 99d 9ca a03 a39 a71 ad5 b02 b63 bc7 c29 c5d c8d cbe d1f d57 dba df2 e29 e61 e84 eed f53 fc1 ffe 1060 1095 10fa 115b 118f 11c7 11fd 122e 125b 1292 12f8 135b 138d 13ba 13ee 1451 1484 14b4 14e1 1543 1579 15db 163f 166c 16a5 170b 1744 1779 17de 1812 1847 187e 18b1 18e8 191d 1950 1973 19e2 1a48 1aae 1aeb 1b1b 1b3e 1baa 1c0f 1c7d 1cba 1ceb 1d1e 1d52 1d86 1db8 1ddb 1e3e 1eb0 1f13 1f50 1f81 1fb1 1fe9 2020 2059 208e 20c4 20f7 2128 215f 2182 21f5 225b 22d3 2310 233e 23a8 2418 247f] but "ordinalMap.length" only 10
        Hide
        Nicola Buso added a comment -

        Which type of facets are you using?

        I'm testing it with FacetField work ok.
        I did few tests with IntAssociationFacetField and I saw your error, seam that IntAssociationFacetField add more ordinals than the "normal" FacetField, but I need to investigate on it.

        If you provide more information I can try to give a look.

        Show
        Nicola Buso added a comment - Which type of facets are you using? I'm testing it with FacetField work ok. I did few tests with IntAssociationFacetField and I saw your error, seam that IntAssociationFacetField add more ordinals than the "normal" FacetField, but I need to investigate on it. If you provide more information I can try to give a look.
        Hide
        Nicola Buso added a comment -

        sorry I did not reply to your question; the decode is mainly a consiquence of:

        /**

        • Expert: override in case you used custom encoding for the categories under
        • this field.
          */
          protected OrdinalsReader getOrdinalsReader(String field) { return new DocValuesOrdinalsReader(field); }
        Show
        Nicola Buso added a comment - sorry I did not reply to your question; the decode is mainly a consiquence of: /** Expert: override in case you used custom encoding for the categories under this field. */ protected OrdinalsReader getOrdinalsReader(String field) { return new DocValuesOrdinalsReader(field); }
        Hide
        Littlestar added a comment -

        4.6.1 works well, but 4.9.0 works fail.

        In 4.6.1, I use CategoryPath.
        In 4.9.0, I use FacetField.

        4.9.0 missing OrdinalMappingAtomicReader, I get it from 4.10 trunk.
        I use it for merging indexes with taxonomies.

        Show
        Littlestar added a comment - 4.6.1 works well, but 4.9.0 works fail. In 4.6.1, I use CategoryPath. In 4.9.0, I use FacetField. 4.9.0 missing OrdinalMappingAtomicReader, I get it from 4.10 trunk. I use it for merging indexes with taxonomies.
        Hide
        Littlestar added a comment - - edited

        I test again.

        this bug only occur when there is another BinaryDocValue field.
        two field: FacetField + BinaryDocValuesField

        when I remove the BinaryDocValuesField, tested ok.

        I think OrdinalMappingBinaryDocValues#getBinaryDocValues is wrong in 4.10.0
        it has no check whether the BinaryDocValuesField is FacetField or not, just wrapper it to OrdinalMappingBinaryDocValues.

        in 4.6.1, it has checked whether the field exist in dvFieldMap or not.

        in 4.6.1
        @Override
        public BinaryDocValues getBinaryDocValues(String field) throws IOException {
        BinaryDocValues inner = super.getBinaryDocValues(field);
        if (inner == null)

        { return inner; }

        CategoryListParams clp = dvFieldMap.get(field);
        if (clp == null) { return inner; }

        else

        { return new OrdinalMappingBinaryDocValues(clp, inner); }

        }

        Show
        Littlestar added a comment - - edited I test again. this bug only occur when there is another BinaryDocValue field. two field: FacetField + BinaryDocValuesField when I remove the BinaryDocValuesField, tested ok. I think OrdinalMappingBinaryDocValues#getBinaryDocValues is wrong in 4.10.0 it has no check whether the BinaryDocValuesField is FacetField or not, just wrapper it to OrdinalMappingBinaryDocValues. in 4.6.1, it has checked whether the field exist in dvFieldMap or not. in 4.6.1 @Override public BinaryDocValues getBinaryDocValues(String field) throws IOException { BinaryDocValues inner = super.getBinaryDocValues(field); if (inner == null) { return inner; } CategoryListParams clp = dvFieldMap.get(field); if (clp == null) { return inner; } else { return new OrdinalMappingBinaryDocValues(clp, inner); } }
        Hide
        Littlestar added a comment -

        the following patch works well for me.

        OrdinalMappingAtomicReader(4.10.0)
        @Override
        public BinaryDocValues getBinaryDocValues(String field) throws IOException {
        if (!field.equals(facetsConfig.getDimConfig(field).indexFieldName))

        { return super.getBinaryDocValues(field); }

        final OrdinalsReader ordsReader = getOrdinalsReader(field);
        return new OrdinalMappingBinaryDocValues(ordsReader.getReader(in.getContext()));
        }

        Show
        Littlestar added a comment - the following patch works well for me. OrdinalMappingAtomicReader(4.10.0) @Override public BinaryDocValues getBinaryDocValues(String field) throws IOException { if (!field.equals(facetsConfig.getDimConfig(field).indexFieldName)) { return super.getBinaryDocValues(field); } final OrdinalsReader ordsReader = getOrdinalsReader(field); return new OrdinalMappingBinaryDocValues(ordsReader.getReader(in.getContext())); }
        Hide
        Shai Erera added a comment -

        Patch fixes the problem. We need to take the source FacetsConfig in OrdinalMappingAtomicReader and then of course only wrap the BinaryDV fields that were indexed with facets. I also improved the test to make sure we only touch facet fields by OrdinalMappingAtomicReader.

        Show
        Shai Erera added a comment - Patch fixes the problem. We need to take the source FacetsConfig in OrdinalMappingAtomicReader and then of course only wrap the BinaryDV fields that were indexed with facets. I also improved the test to make sure we only touch facet fields by OrdinalMappingAtomicReader.
        Hide
        ASF subversion and git services added a comment -

        Commit 1612079 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1612079 ]

        LUCENE-5801: OrdinalMappingAtomicReader should not wrap non-facet BinaryDocValues fields

        Show
        ASF subversion and git services added a comment - Commit 1612079 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1612079 ] LUCENE-5801 : OrdinalMappingAtomicReader should not wrap non-facet BinaryDocValues fields
        Hide
        ASF subversion and git services added a comment -

        Commit 1612081 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1612081 ]

        LUCENE-5801: OrdinalMappingAtomicReader should not wrap non-facet BinaryDocValues fields

        Show
        ASF subversion and git services added a comment - Commit 1612081 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1612081 ] LUCENE-5801 : OrdinalMappingAtomicReader should not wrap non-facet BinaryDocValues fields
        Hide
        Shai Erera added a comment -

        Committed this fix. Please report if you still encounter problems.

        Show
        Shai Erera added a comment - Committed this fix. Please report if you still encounter problems.
        Hide
        Littlestar added a comment - - edited

        the fixs works failed(no exception throws, but result in wrong facet data).

        default "$facets" not in facetFields.
        so merge with wrong result.

        the following works ok.
        public OrdinalMappingAtomicReader(AtomicReader in, int[] ordinalMap, FacetsConfig srcConfig) {
        super(in);
        this.ordinalMap = ordinalMap;
        facetsConfig = new InnerFacetsConfig();
        facetFields = new HashSet<>();
        + if (srcConfig.getDimConfigs().size() == 0)

        { + facetFields.add(FacetsConfig.DEFAULT_DIM_CONFIG.indexFieldName); + }

        for (DimConfig dc : srcConfig.getDimConfigs().values())

        { facetFields.add(dc.indexFieldName); }

        }

        Show
        Littlestar added a comment - - edited the fixs works failed(no exception throws, but result in wrong facet data). default "$facets" not in facetFields. so merge with wrong result. the following works ok. public OrdinalMappingAtomicReader(AtomicReader in, int[] ordinalMap, FacetsConfig srcConfig) { super(in); this.ordinalMap = ordinalMap; facetsConfig = new InnerFacetsConfig(); facetFields = new HashSet<>(); + if (srcConfig.getDimConfigs().size() == 0) { + facetFields.add(FacetsConfig.DEFAULT_DIM_CONFIG.indexFieldName); + } for (DimConfig dc : srcConfig.getDimConfigs().values()) { facetFields.add(dc.indexFieldName); } }
        Hide
        Shai Erera added a comment -

        Actually, this isn't the correct fix. I modified the test to index two dimensions, one under custom indexFieldName $tags and one under the default. So facetsConfig.getDimConfigs() returns only the $tags facets. If I add the DEFAULT_INDEX_FIELD_NAME (always) then it solves the problem, but then if the app never uses that field name for faceting, but adds it as another BDV, we try to map ordinals ... I think it's not very likely that this happens though, so I'm willing to go with that fix.

        I'm working on a patch with improved test.

        Show
        Shai Erera added a comment - Actually, this isn't the correct fix. I modified the test to index two dimensions, one under custom indexFieldName $tags and one under the default. So facetsConfig.getDimConfigs() returns only the $tags facets. If I add the DEFAULT_INDEX_FIELD_NAME (always) then it solves the problem, but then if the app never uses that field name for faceting, but adds it as another BDV, we try to map ordinals ... I think it's not very likely that this happens though, so I'm willing to go with that fix. I'm working on a patch with improved test.
        Hide
        Shai Erera added a comment -

        Patch fixes the problem, but I still want to review the test, make sure it covers this index merge end-to-end.

        Show
        Shai Erera added a comment - Patch fixes the problem, but I still want to review the test, make sure it covers this index merge end-to-end.
        Hide
        ASF subversion and git services added a comment -

        Commit 1612197 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1612197 ]

        LUCENE-5801: add default indexFieldName to facetFields

        Show
        ASF subversion and git services added a comment - Commit 1612197 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1612197 ] LUCENE-5801 : add default indexFieldName to facetFields
        Hide
        ASF subversion and git services added a comment -

        Commit 1612198 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1612198 ]

        LUCENE-5801: add default indexFieldName to facetFields

        Show
        ASF subversion and git services added a comment - Commit 1612198 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1612198 ] LUCENE-5801 : add default indexFieldName to facetFields
        Hide
        Shai Erera added a comment -

        Committed the fix.

        Show
        Shai Erera added a comment - Committed the fix.

          People

          • Assignee:
            Shai Erera
            Reporter:
            Nicola Buso
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development