Lucene - Core
  1. Lucene - Core
  2. LUCENE-4700

OrdinalPolicy and PathPolicy should be per-CategoryListParams

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2, 6.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Today these two are per FacetIndexingParams, which means that once defined, they affect all category lists. This prevents for example to index one category list with OrdinalPolicy.NO_PARENTS and another with OrdinalPolicy.ALL_PARENTS. Especially now that we know NO_PARENTS is faster (see LUCENE-4600), it will be good if users can control this setting per CategoryListParams, and index only the few facets which a document has more than once (e.g. Author) in a separate category list.

        Activity

        Hide
        Shai Erera added a comment -

        Following the recent facets work, I think that as part of this issue we should do the following two things (in addition to what I described above):

        • Make OrdinalPolicy an enum with two constants (ALL/NO_PARENTS). It's already hard to support just these two (see LUCENE-4610 and LUCENE-4600), and it's not at all clear how to support arbitrary OrdinalPoilcy-ies that users will provide.
          • Rather, if one really wishes to encode only say levels 3 and below, he can extend FacetFields and provide his own CategoryListBuilder.
          • For the search side, he'll need to provide whatever will work for him (I cannot even describe here what API exactly because of the complexity)
        • Nuke PathPolicy. One can extend FacetFields and provide his own DrillDownStream. I'll need to check about that one, but it looks like we can get rid of it too.
        Show
        Shai Erera added a comment - Following the recent facets work, I think that as part of this issue we should do the following two things (in addition to what I described above): Make OrdinalPolicy an enum with two constants (ALL/NO_PARENTS). It's already hard to support just these two (see LUCENE-4610 and LUCENE-4600 ), and it's not at all clear how to support arbitrary OrdinalPoilcy-ies that users will provide. Rather, if one really wishes to encode only say levels 3 and below, he can extend FacetFields and provide his own CategoryListBuilder. For the search side, he'll need to provide whatever will work for him (I cannot even describe here what API exactly because of the complexity) Nuke PathPolicy. One can extend FacetFields and provide his own DrillDownStream. I'll need to check about that one, but it looks like we can get rid of it too.
        Hide
        Shai Erera added a comment -

        Patch nukes PathPolicy and moves OrdinalPolicy under CategoryListParams as an enum with the values NO_PARENTS and ALL_PARENTS.

        Show
        Shai Erera added a comment - Patch nukes PathPolicy and moves OrdinalPolicy under CategoryListParams as an enum with the values NO_PARENTS and ALL_PARENTS.
        Hide
        Michael McCandless added a comment -

        +1

        But you should put a // nocommit in front of this?:

        -    if (IS_J9_JAVA7) {
        +    if (false && IS_J9_JAVA7) {
        
        Show
        Michael McCandless added a comment - +1 But you should put a // nocommit in front of this?: - if (IS_J9_JAVA7) { + if (false && IS_J9_JAVA7) {
        Hide
        Shai Erera added a comment -

        Urgh, good catch! Fixed. Will commit shortly.

        Show
        Shai Erera added a comment - Urgh, good catch! Fixed. Will commit shortly.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Shai Erera
        http://svn.apache.org/viewvc?view=revision&revision=1437661

        LUCENE-4700: move OrdinalPolicy to CategoryListParams

        Show
        Commit Tag Bot added a comment - [trunk commit] Shai Erera http://svn.apache.org/viewvc?view=revision&revision=1437661 LUCENE-4700 : move OrdinalPolicy to CategoryListParams
        Hide
        Shai Erera added a comment -

        Committed to trunk and 4x.

        Show
        Shai Erera added a comment - Committed to trunk and 4x.
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Shai Erera
        http://svn.apache.org/viewvc?view=revision&revision=1437678

        LUCENE-4700: move OrdinalPolicy to CategoryListParams

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Shai Erera http://svn.apache.org/viewvc?view=revision&revision=1437678 LUCENE-4700 : move OrdinalPolicy to CategoryListParams
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Shai Erera
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development