Solr
  1. Solr
  2. SOLR-7477

multi-select support for facet module

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2
    • Component/s: Facet Module
    • Labels:
      None

      Description

      Multi-select support essentially means (at a minimum) support for excluding tagged filters.

      1. SOLR-7477.patch
        17 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment - - edited

        "exclude" could refer to excluding specific terms by some criteria.
        perhaps "excludeTags or "excludeTagged" as the param name to be more descriptive?
        "excludeTaggedFilters" seems too long?

        Show
        Yonik Seeley added a comment - - edited "exclude" could refer to excluding specific terms by some criteria. perhaps "excludeTags or "excludeTagged" as the param name to be more descriptive? "excludeTaggedFilters" seems too long?
        Hide
        Shalin Shekhar Mangar added a comment -

        I like "excludeTags"

        Show
        Shalin Shekhar Mangar added a comment - I like "excludeTags"
        Hide
        Yonik Seeley added a comment -

        Here's a patch that implements "excludeTags"

        It was a little trickier given that someone can excludeTags at any point in the facet hierarchy. To support this I basically had to start keeping track of of filters at each facet level so the current facet domain could be reconstructed (minus the excluded filters).

        Show
        Yonik Seeley added a comment - Here's a patch that implements "excludeTags" It was a little trickier given that someone can excludeTags at any point in the facet hierarchy. To support this I basically had to start keeping track of of filters at each facet level so the current facet domain could be reconstructed (minus the excluded filters).
        Hide
        ASF subversion and git services added a comment -

        Commit 1676743 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1676743 ]

        SOLR-7477: implement facet excludeTags

        Show
        ASF subversion and git services added a comment - Commit 1676743 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1676743 ] SOLR-7477 : implement facet excludeTags
        Hide
        Shalin Shekhar Mangar added a comment -

        The following test seed always reproduces after your commit.

        3616 T13 oas.SolrTestCaseHS.matchJSON ERROR query failed JSON validation. error=mismatch: '3'!='2' @ facets/f2/count
        	 expected =facets=={ 'count':2,  'f1':{'count':1, 'nj':{'count':1}, 'ny':{'count':0}},'f2':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f3':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f4':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f5':{'count':1, 'nj':{'count':1}, 'ny':{'count':0}}}
        	 response = {
        	  "responseHeader":{
        	    "status":0,
        	    "QTime":13},
        	  "response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[]
        	  },
        	  "facets":{
        	    "count":2,
        	    "f1":{
        	      "count":1,
        	      "ny":{
        	        "count":0},
        	      "nj":{
        	        "count":1}},
        	    "f2":{
        	      "count":2,
        	      "ny":{
        	        "count":0},
        	      "nj":{
        	        "count":2}},
        	    "f3":{
        	      "count":2,
        	      "ny":{
        	        "count":0},
        	      "nj":{
        	        "count":2}},
        	    "f4":{
        	      "count":2,
        	      "ny":{
        	        "count":0},
        	      "nj":{
        	        "count":2}},
        	    "f5":{
        	      "count":1,
        	      "ny":{
        	        "count":0},
        	      "nj":{
        	        "count":1}}}}
        	
        3618 T13 oas.SolrTestCaseJ4.tearDown ###Ending testDistrib
        
        java.lang.RuntimeException: mismatch: '3'!='2' @ facets/f2/count
        	at __randomizedtesting.SeedInfo.seed([1C49DE2994FCEEBB:940A2DFCEF255D27]:0)
        	at org.apache.solr.SolrTestCaseHS.matchJSON(SolrTestCaseHS.java:160)
        	at org.apache.solr.SolrTestCaseHS.assertJQ(SolrTestCaseHS.java:142)
        	at org.apache.solr.SolrTestCaseHS$Client.testJQ(SolrTestCaseHS.java:288)
        	at org.apache.solr.search.facet.TestJsonFacets.doStatsTemplated(TestJsonFacets.java:826)
        	at org.apache.solr.search.facet.TestJsonFacets.doStats(TestJsonFacets.java:328)
        	at org.apache.solr.search.facet.TestJsonFacets.testDistrib(TestJsonFacets.java:855)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1627)
        
        ant test  -Dtestcase=TestJsonFacets -Dtests.method=testDistrib -Dtests.seed=1C49DE2994FCEEBB -Dtests.locale=pt -Dtests.timezone=Asia/Hovd -Dtests.asserts=true -Dtests.file.encoding=UTF-8
        
        Show
        Shalin Shekhar Mangar added a comment - The following test seed always reproduces after your commit. 3616 T13 oas.SolrTestCaseHS.matchJSON ERROR query failed JSON validation. error=mismatch: '3'!='2' @ facets/f2/count expected =facets=={ 'count':2, 'f1':{'count':1, 'nj':{'count':1}, 'ny':{'count':0}},'f2':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f3':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f4':{'count':3, 'nj':{'count':2}, 'ny':{'count':1}},'f5':{'count':1, 'nj':{'count':1}, 'ny':{'count':0}}} response = { "responseHeader" :{ "status" :0, "QTime" :13}, "response" :{ "numFound" :2, "start" :0, "maxScore" :1.0, "docs" :[] }, "facets" :{ "count" :2, "f1" :{ "count" :1, "ny" :{ "count" :0}, "nj" :{ "count" :1}}, "f2" :{ "count" :2, "ny" :{ "count" :0}, "nj" :{ "count" :2}}, "f3" :{ "count" :2, "ny" :{ "count" :0}, "nj" :{ "count" :2}}, "f4" :{ "count" :2, "ny" :{ "count" :0}, "nj" :{ "count" :2}}, "f5" :{ "count" :1, "ny" :{ "count" :0}, "nj" :{ "count" :1}}}} 3618 T13 oas.SolrTestCaseJ4.tearDown ###Ending testDistrib java.lang.RuntimeException: mismatch: '3'!='2' @ facets/f2/count at __randomizedtesting.SeedInfo.seed([1C49DE2994FCEEBB:940A2DFCEF255D27]:0) at org.apache.solr.SolrTestCaseHS.matchJSON(SolrTestCaseHS.java:160) at org.apache.solr.SolrTestCaseHS.assertJQ(SolrTestCaseHS.java:142) at org.apache.solr.SolrTestCaseHS$Client.testJQ(SolrTestCaseHS.java:288) at org.apache.solr.search.facet.TestJsonFacets.doStatsTemplated(TestJsonFacets.java:826) at org.apache.solr.search.facet.TestJsonFacets.doStats(TestJsonFacets.java:328) at org.apache.solr.search.facet.TestJsonFacets.testDistrib(TestJsonFacets.java:855) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1627) ant test -Dtestcase=TestJsonFacets -Dtests.method=testDistrib -Dtests.seed=1C49DE2994FCEEBB -Dtests.locale=pt -Dtests.timezone=Asia/Hovd -Dtests.asserts= true -Dtests.file.encoding=UTF-8
        Hide
        Yonik Seeley added a comment -

        Hmmm, that's strange. May be related to distrib search and not processing sub-facets for buckets w/ no count (of course if a sub-facet can expand the domain, then that makes things interesting).

        I'll fix when I can... but all my calls to svn are currently hanging. I assume it's an ASF prob and not on my end.

        Show
        Yonik Seeley added a comment - Hmmm, that's strange. May be related to distrib search and not processing sub-facets for buckets w/ no count (of course if a sub-facet can expand the domain, then that makes things interesting). I'll fix when I can... but all my calls to svn are currently hanging. I assume it's an ASF prob and not on my end.
        Hide
        ASF subversion and git services added a comment -

        Commit 1676760 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1676760 ]

        SOLR-7477: implement facet excludeTags

        Show
        ASF subversion and git services added a comment - Commit 1676760 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1676760 ] SOLR-7477 : implement facet excludeTags
        Hide
        ASF subversion and git services added a comment -

        Commit 1676763 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1676763 ]

        SOLR-7477: tests - processEmpty buckets to try and get distrib counts to match

        Show
        ASF subversion and git services added a comment - Commit 1676763 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1676763 ] SOLR-7477 : tests - processEmpty buckets to try and get distrib counts to match
        Hide
        ASF subversion and git services added a comment -

        Commit 1676764 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1676764 ]

        SOLR-7477: tests - processEmpty buckets to try and get distrib counts to match

        Show
        ASF subversion and git services added a comment - Commit 1676764 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1676764 ] SOLR-7477 : tests - processEmpty buckets to try and get distrib counts to match
        Hide
        ASF subversion and git services added a comment -

        Commit 1676945 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1676945 ]

        SOLR-7477: more tests for excludeTags

        Show
        ASF subversion and git services added a comment - Commit 1676945 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1676945 ] SOLR-7477 : more tests for excludeTags
        Hide
        ASF subversion and git services added a comment -

        Commit 1676980 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1676980 ]

        SOLR-7477: more tests for excludeTags

        Show
        ASF subversion and git services added a comment - Commit 1676980 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1676980 ] SOLR-7477 : more tests for excludeTags
        Hide
        ASF subversion and git services added a comment -

        Commit 1677011 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1677011 ]

        SOLR-7477: fix test to process empty buckets for distrib search

        Show
        ASF subversion and git services added a comment - Commit 1677011 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1677011 ] SOLR-7477 : fix test to process empty buckets for distrib search
        Hide
        ASF subversion and git services added a comment -

        Commit 1677012 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1677012 ]

        SOLR-7477: fix test to process empty buckets for distrib search

        Show
        ASF subversion and git services added a comment - Commit 1677012 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1677012 ] SOLR-7477 : fix test to process empty buckets for distrib search
        Hide
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development