Solr
  1. Solr
  2. SOLR-5039

Admin UI displays -1 for term count in multiValued fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 5.0
    • Component/s: None
    • Labels:
      None

      Description

      I thought this had been a JIRA before, but I couldn't find it. Problem is that LukeRequestHandler.getDetailedFieldInfo gets the count by this line:

      tiq.distinctTerms = new Long(terms.size()).intValue();

      which is -1 at least for multiValued fields. I'll attach a patch in a second that just counts things up. It worked last night, but it was late.

      I obviously don't understand what's up with MultiTerms.size() is hard-coded to return -1. Can anyone shed light on this? Or see the two-line change and see if it makes sense?

      1. SOLR-5039.patch
        1 kB
        Erick Erickson

        Activity

        Hide
        Erick Erickson added a comment -

        Had to manually edit this patch, may not apply cleanly. I'll do something cleaner later today.

        Put this in 4.4 too?

        Show
        Erick Erickson added a comment - Had to manually edit this patch, may not apply cleanly. I'll do something cleaner later today. Put this in 4.4 too?
        Hide
        Robert Muir added a comment -

        I still think it woudl be significantly better to show this kind of information per-segment than to enumerate terms: which doesnt work and can kill the server if you have many many terms.

        Show
        Robert Muir added a comment - I still think it woudl be significantly better to show this kind of information per-segment than to enumerate terms: which doesnt work and can kill the server if you have many many terms.
        Hide
        Erick Erickson added a comment -

        Yeah, this is what killed perf in the 3.x version, it actually went through and counted stuff up for all fields before you got any response back. At least this only happens when you click the info button in the browse schema for a specific field.

        But in order to construct the histogram it needs to enumerate the terms anyway, so this isn't going to change the perf and will give better results...

        Show
        Erick Erickson added a comment - Yeah, this is what killed perf in the 3.x version, it actually went through and counted stuff up for all fields before you got any response back. At least this only happens when you click the info button in the browse schema for a specific field. But in order to construct the histogram it needs to enumerate the terms anyway, so this isn't going to change the perf and will give better results...
        Hide
        Robert Muir added a comment -

        But in order to construct the histogram it needs to enumerate the terms anyway, so this isn't going to change the perf and will give better results...

        Yeah but this histogram stuff is separate, just because its slow, doesnt mean termCount should be slow. We could show the termCount per segment instantly.

        Show
        Robert Muir added a comment - But in order to construct the histogram it needs to enumerate the terms anyway, so this isn't going to change the perf and will give better results... Yeah but this histogram stuff is separate, just because its slow, doesnt mean termCount should be slow. We could show the termCount per segment instantly .
        Hide
        ASF subversion and git services added a comment -

        Commit 1502959 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1502959 ]

        fix for SOLR-5039, admin/schema browser displaying -1 for unique terms on multiValued fields

        Show
        ASF subversion and git services added a comment - Commit 1502959 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1502959 ] fix for SOLR-5039 , admin/schema browser displaying -1 for unique terms on multiValued fields
        Hide
        ASF subversion and git services added a comment -

        Commit 1502966 from Erick Erickson in branch 'dev/branches/lucene_solr_4_4'
        [ https://svn.apache.org/r1502966 ]

        fix for SOLR-5039, admin/schema browser displaying -1 for unique terms on multiValued fields

        Show
        ASF subversion and git services added a comment - Commit 1502966 from Erick Erickson in branch 'dev/branches/lucene_solr_4_4' [ https://svn.apache.org/r1502966 ] fix for SOLR-5039 , admin/schema browser displaying -1 for unique terms on multiValued fields
        Hide
        ASF subversion and git services added a comment -

        Commit 1502967 from Erick Erickson in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1502967 ]

        fix for SOLR-5039, admin/schema browser displaying -1 for unique terms on multiValued fields

        Show
        ASF subversion and git services added a comment - Commit 1502967 from Erick Erickson in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1502967 ] fix for SOLR-5039 , admin/schema browser displaying -1 for unique terms on multiValued fields
        Hide
        David Smiley added a comment -

        Erick, I am looking at CHANGES.txt on trunk and see you added this as a bug fix under 4.3.1. This issue shows it's fixed on 4.4. Which is it?

        Show
        David Smiley added a comment - Erick, I am looking at CHANGES.txt on trunk and see you added this as a bug fix under 4.3.1. This issue shows it's fixed on 4.4. Which is it?
        Hide
        ASF subversion and git services added a comment -

        Commit 1503335 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1503335 ]

        Moved SOLR-5039 to proper section

        Show
        ASF subversion and git services added a comment - Commit 1503335 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1503335 ] Moved SOLR-5039 to proper section
        Hide
        ASF subversion and git services added a comment -

        Commit 1503336 from Erick Erickson in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1503336 ]

        Moved SOLR-5039 to proper section

        Show
        ASF subversion and git services added a comment - Commit 1503336 from Erick Erickson in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1503336 ] Moved SOLR-5039 to proper section
        Hide
        Erick Erickson added a comment -

        Crap! Whaddya want anyway? It's right above the 4.3 section... and immediately below the 4.3.1.

        It's a 4.4 fix.

        Fixing it up, thanks for catching!

        Show
        Erick Erickson added a comment - Crap! Whaddya want anyway? It's right above the 4.3 section... and immediately below the 4.3.1. It's a 4.4 fix. Fixing it up, thanks for catching!
        Hide
        ASF subversion and git services added a comment -

        Commit 1503338 from Erick Erickson in branch 'dev/branches/lucene_solr_4_4'
        [ https://svn.apache.org/r1503338 ]

        Moved SOLR-5039 to proper section

        Show
        ASF subversion and git services added a comment - Commit 1503338 from Erick Erickson in branch 'dev/branches/lucene_solr_4_4' [ https://svn.apache.org/r1503338 ] Moved SOLR-5039 to proper section
        Hide
        Steve Rowe added a comment -

        Bulk close resolved 4.4 issues

        Show
        Steve Rowe added a comment - Bulk close resolved 4.4 issues

          People

          • Assignee:
            Erick Erickson
            Reporter:
            Erick Erickson
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development