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

Littlestar commented on LUCENE-5801:
------------------------------------

the fixs works failed.
because 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);
    }
  }

> Resurrect org.apache.lucene.facet.util.OrdinalMappingAtomicReader
> -----------------------------------------------------------------
>
>                 Key: LUCENE-5801
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5801
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.7
>            Reporter: Nicola Buso
>            Assignee: Shai Erera
>             Fix For: 5.0, 4.10
>
>         Attachments: LUCENE-5801.patch, LUCENE-5801.patch, LUCENE-5801.patch, 
> LUCENE-5801_1.patch, LUCENE-5801_2.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to