Details

    • Type: Bug
    • Status: Waiting for Feedback
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2 (Dijkstra SR2)
    • Fix Version/s: None
    • Component/s: Core, Repository
    • Labels:
      None
    • Sprint:
      52 - Evans GA, 53 - Evans SR1, 54 - Fowler M1, 55 - Evans SR2, 56 - Fowler RC1, 56 - Fowler GA, 57 - Fowler Aftermath, 58 - Gosling M1, 59 - Evans / Fowler SR, Gosling RC1

      Description

      I am trying to get Solr facet fields working with pivots. The following is the Solr query I am trying execute via Spring Data Solr

      q=*:*
      sort=action_ts DESC
      facet=true
      facet.field=user
      facet.pivot=user,action
      

      The direct Solr query returns results as expected as shown below (only a small portion is shown below):

      "facet_fields":{
            "user":[
              "alpha@mycompany.com",15,
              "delta@mycompany.com",15,
              "echo@mycompany.com",15,
              "golf@mycompany.com",15,
              "hotel@mycompany.com",15,
              "india@mycompany.com",15,
              "juliett@mycompany.com",15,
              "november@mycompany.com",15,
              "oscar@mycompany.com",15,
              "foxtrot@mycompany.com",14]},
          "facet_dates":{},
          "facet_ranges":{},
          "facet_pivot":{
            "user,action":[{
                "field":"user",
                "value":"alpha@mycompany.com",
                "count":15,
                "pivot":[{
                    "field":"action",
                    "value":"add",
                    "count":7},
                  {
                    "field":"action",
                    "value":"download",
                    "count":3},
                  {
                    "field":"action",
                    "value":"login",
                    "count":2},
                  {
                    "field":"action",
                    "value":"search",
                    "count":2},
                  {
                    "field":"action",
                    "value":"logout",
                    "count":1}]},
      	<Rest of the output truncated ...>	
      

      I am trying to reproduce the same with SDS (version: 1.2.2.RELEASE)

      In my repository I have

      @Query(value = "(?0)", filters="(?1)" )
      @Facet( fields = {"user"}, pivotFields={"user,action"})
      FacetPage<UserAction> findAllWithFiltersAndFacets(String query, String filters, Pageable page);
      

      This query completes fine and the facet results appear as expected (see below):

      "facetResultPages": [
              {
                  "content": [
                      {
                          "valueCount": 15,
                          "value": "alpha@mycompany.com",
                          "field": {
                              "name": "user"
                          },
                          "key": {
                              "name": "user"
                          }
                      },
                      {
                          "valueCount": 15,
                          "value": "delta@mycompany.com",
                          "field": {
                              "name": "user"
                          },
                          "key": {
                              "name": "user"
                          }
                      },
                      {
                          "valueCount": 15,
                          "value": "echo@mycompany.com",
                          "field": {
                              "name": "user"
                          },
                          "key": {
                              "name": "user"
                          }
                      },
      <Rest of the output truncated ...>
      

      However, the facet pivot output does not have any results (see below):

      "facetPivotFields": [
              {
                  "fields": [
                      {
                          "name": "user"
                      },
                      {
                          "name": "action"
                      }
                  ],
                  "name": "user,action"
              }
          ],
          
      

      No pivot information appears in the output. I have also attached the entire output with this issue.

      I also tried the alternate way to specify the pivots:

      @Query(value = "(?0)", filters="(?1)" )
      @Facet( fields = {"user"}, pivots={ @Pivot({"user", "action"}) } )
      FacetPage<UserAction> findAllWithFiltersAndFacets(String query, String filters, Pageable page);
      

      The above method also produced the same incorrect results.

      What am I missing here?

      Thanks

        Attachments

          Activity

            People

            • Assignee:
              cstrobl Christoph Strobl
              Reporter:
              ajegam Jega A
              Last updater:
              Christoph Strobl
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: