Solr
  1. Solr
  2. SOLR-2380

Problem when using facet.offset with facet.sort=lex and shards

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1, 3.1, 4.0-ALPHA
    • Fix Version/s: 3.1
    • Component/s: search
    • Labels:
      None

      Description

      I'm having a problem using distributed search in conjunction with the facet.offset parameter and lexical facet value sorting.

      I have a facet with ~100k values in one index. I'm wanting to page through them alphabetically. When not using distributed search, everything works just fine, and very quick. A query like this works, returning 10 facet values starting at the 50,001st:

      http://server:port/solr/select/?q=*:*&facet.field=subject_full_facet&facet=true&f.subject_full_facet.facet.limit=10&facet.sort=lex&facet.offset=50000
      # Butterflies - Indiana !

      However, if I enable distributed search, using a single shard (which is the same index), I get no facet values returned.

      http://server:port/solr/select/?q=*:*&facet.field=subject_full_facet&facet=true&f.subject_full_facet.facet.limit=10&facet.sort=lex&facet.offset=50000&shards=server:port/solr
      # empty list :(

      Doing a little more testing, I'm finding that with sharding I often get an empty list any time the facet.offset >= facet.limit. Also, by example, if I do facet.limit=100 and facet.offset=90, I get 10 facet values. Doing so without sharding, I get the expected 100 values (starting at what would normally be the 91st).

      Thanks,

      Peter

      1. SOLR-2380.patch
        2 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Here's a patch that fixes and a test that fails w/o the patch.

        Show
        Yonik Seeley added a comment - Here's a patch that fixes and a test that fails w/o the patch.
        Hide
        Yonik Seeley added a comment -

        committed to trunk and backported to 3x

        Show
        Yonik Seeley added a comment - committed to trunk and backported to 3x
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development