Solr
  1. Solr
  2. SOLR-1492

Can't facet Trie fields with precisionSteps

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      A known limitation - can't facet on multi-part trie fields.

      1. SOLR-1492.patch
        6 kB
        Yonik Seeley
      2. SOLR-1492.patch
        10 kB
        Yonik Seeley
      3. SOLR-1492.patch
        14 kB
        Shalin Shekhar Mangar
      4. SOLR-1492.patch
        14 kB
        Shalin Shekhar Mangar
      5. SOLR-1492.patch
        25 kB
        Yonik Seeley

        Activity

        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4
        Hide
        Yonik Seeley added a comment -

        committed.

        Show
        Yonik Seeley added a comment - committed.
        Hide
        Yonik Seeley added a comment -

        OK, this patch:

        • includes SOLR-1491 so single valued single part trie field faceting is handled by the field cache faceting code
        • adds support for multi-precision trie fields to UnUnvertedField faceting
        • adds support for multi-precision trie fields to UnUnvertedField statistics
        • adds "missing" functionality to UnUnvertedField stats.facet and fixes other bugs in multi-valued stats.facet
        • forces the use of UnInvertedField for both faceting and stats for multi-precision trie fields (since Lucene StringIndex doesn't support)
        Show
        Yonik Seeley added a comment - OK, this patch: includes SOLR-1491 so single valued single part trie field faceting is handled by the field cache faceting code adds support for multi-precision trie fields to UnUnvertedField faceting adds support for multi-precision trie fields to UnUnvertedField statistics adds "missing" functionality to UnUnvertedField stats.facet and fixes other bugs in multi-valued stats.facet forces the use of UnInvertedField for both faceting and stats for multi-precision trie fields (since Lucene StringIndex doesn't support)
        Hide
        Yonik Seeley added a comment -

        Commented in the wrong issue before:
        Found it... in UnInvertedField.getStats(), the FieldType was being overwritten by the type of the facet fields.

        Show
        Yonik Seeley added a comment - Commented in the wrong issue before: Found it... in UnInvertedField.getStats(), the FieldType was being overwritten by the type of the facet fields.
        Hide
        Yonik Seeley added a comment -

        It appears that just the normal stats.field doesn't work with field types other than plain int (i.e. not sortable).

        Show
        Yonik Seeley added a comment - It appears that just the normal stats.field doesn't work with field types other than plain int (i.e. not sortable).
        Hide
        Grant Ingersoll added a comment -

        stats.facet doesn't work for multivalued fields at all, unless you fixed that here.

        Show
        Grant Ingersoll added a comment - stats.facet doesn't work for multivalued fields at all, unless you fixed that here.
        Hide
        Yonik Seeley added a comment - - edited

        Hmmm, stats.facet is failing for the trie fields... I'm looking into it.

        Update: this isn't related to trie... the multiValued stats stuff is buggy and wouldn't work with sortable fields either - the tests only covered plain int.

        Show
        Yonik Seeley added a comment - - edited Hmmm, stats.facet is failing for the trie fields... I'm looking into it. Update: this isn't related to trie... the multiValued stats stuff is buggy and wouldn't work with sortable fields either - the tests only covered plain int.
        Hide
        Shalin Shekhar Mangar added a comment - - edited

        I'm trying date faceting (facet.date) and the counts seem to be wrong (I'm expecting 2 but getting 4 back)

        Of course it will give 4 because the upperbound is inclusive! OK, TestTrie passes.

        Show
        Shalin Shekhar Mangar added a comment - - edited I'm trying date faceting (facet.date) and the counts seem to be wrong (I'm expecting 2 but getting 4 back) Of course it will give 4 because the upperbound is inclusive! OK, TestTrie passes.
        Hide
        Shalin Shekhar Mangar added a comment -

        I'm trying date faceting (facet.date) and the counts seem to be wrong (I'm expecting 2 but getting 4 back). See TestTrie in my patch. I'm trying to figure it out.

        Normal faceting on a trie date field works fine.

        Show
        Shalin Shekhar Mangar added a comment - I'm trying date faceting (facet.date) and the counts seem to be wrong (I'm expecting 2 but getting 4 back). See TestTrie in my patch. I'm trying to figure it out. Normal faceting on a trie date field works fine.
        Hide
        Yonik Seeley added a comment - - edited

        Date faceting does not work correctly.

        Really? It should... I added support for date faceting on trie fields long ago. What doesn't work?
        edit: Or do you mean normal faceting on a trie date field (as opposed to date faceting) doesn't work?

        Show
        Yonik Seeley added a comment - - edited Date faceting does not work correctly. Really? It should... I added support for date faceting on trie fields long ago. What doesn't work? edit: Or do you mean normal faceting on a trie date field (as opposed to date faceting) doesn't work?
        Hide
        Shalin Shekhar Mangar added a comment -

        Tests for faceting added on top of Yonik's latest patch.

        Date faceting does not work correctly.

        Show
        Shalin Shekhar Mangar added a comment - Tests for faceting added on top of Yonik's latest patch. Date faceting does not work correctly.
        Hide
        Yonik Seeley added a comment - - edited

        Updated patch with stats support.

        edit: ignore changes to the stats tests for now - work in progress.

        Show
        Yonik Seeley added a comment - - edited Updated patch with stats support. edit: ignore changes to the stats tests for now - work in progress.
        Hide
        Yonik Seeley added a comment -

        Hey, more good news... stats now works with both singleValued and multiValued trie fields after this patch (I assume because the stats component piggybacks off of UnInvertedField, and it also mistakenly thinks all trie based fields are multiValued).

        We should be able to get rid of both disadvantages that the trie fields had in comparison to the older sortable fields.

        Show
        Yonik Seeley added a comment - Hey, more good news... stats now works with both singleValued and multiValued trie fields after this patch (I assume because the stats component piggybacks off of UnInvertedField, and it also mistakenly thinks all trie based fields are multiValued). We should be able to get rid of both disadvantages that the trie fields had in comparison to the older sortable fields.
        Hide
        Shalin Shekhar Mangar added a comment -

        I guess I was solving the wrong problems in SOLR-1483

        I'll add some tests.

        Show
        Shalin Shekhar Mangar added a comment - I guess I was solving the wrong problems in SOLR-1483 I'll add some tests.
        Hide
        Yonik Seeley added a comment -

        Inspired by SOLR-1483, here's a simple hacky patch that allows faceting on multi-part trie fields so we can remove another "exception".

        I've tested manually, but unit tests would be nice.

        Show
        Yonik Seeley added a comment - Inspired by SOLR-1483 , here's a simple hacky patch that allows faceting on multi-part trie fields so we can remove another "exception". I've tested manually, but unit tests would be nice.

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development