I trying to facet over some data. My query is:

http://localhost:9020/search/p1-umShard-1/select?q=*:*&fq=(msgType:38+AND+snCreatedTime:[2015-04-15T00:00:00Z%20TO%20*])&debug=timing&wt=json&rows=0
{

   - responseHeader:
   {
      - status: 0,
      - QTime: 45
      },
   - response:
   {
      - numFound: 137,
      - start: 0,
      - docs: [ ]
      },
   - debug:
   {
      - timing:
      {
         - time: 45,
         - prepare:
         {
            - time: 0,
            - query:
            {
               - time: 0
               },
            - facet:
            {
               - time: 0
               },
            - mlt:
            {
               - time: 0
               },
            - highlight:
            {
               - time: 0
               },
            - stats:
            {
               - time: 0
               },
            - debug:
            {
               - time: 0
               }
            },
         - process:
         {
            - time: 45,
            - query:
            {
               - time: 45
               },
            - facet:
            {
               - time: 0
               },
            - mlt:
            {
               - time: 0
               },
            - highlight:
            {
               - time: 0
               },
            - stats:
            {
               - time: 0
               },
            - debug:
            {
               - time: 0
               }
            }
         }
      }

}

According to this there are 137 records. Now I am faceting over these 137
records with facet.method=fc. Ideally it should just iterate over these 137
records and sub up the facets.

Facet query is:

http://localhost:9020/search/p1-umShard-1/select?q=*:*&fq=(msgType:38+AND+snCreatedTime:[2015-04-15T00:00:00Z%20TO%20*])&facet.field=conversationId&facet=true&indent=on&wt=json&rows=0&facet.method=fc&debug=timing
{

   - responseHeader:
   {
      - status: 0,
      - QTime: 395103
      },
   - response:
   {
      - numFound: 137,
      - start: 0,
      - docs: [ ]
      },
   - facet_counts:
   {
      - facet_queries: { },
      - facet_fields:
      {
         - conversationId:
         [
            - "t_mid.1429800181915:43409a654f429a7279",
            - 14,
            - "t_mid.1430066755916:3f1df73a90f3f56b24",
            - 12,
            - "t_mid.1424867675391:7a0ce173662f6b3230",
            - 10,
            - "t_mid.1429264970537:d53579af6852fdd409",
            - 8,
            - "t_mid.1429968009539:ad97aa3fcfc933ac32",
            - 6,
            - "t_mid.1429076620603:cf8c8da6cc7c0f7a40",
            - 5,
            - "t_mid.1429967431080:6f1037c42bc6d10921",
            - 4,
            - "t_mid.1430335716379:e8d2d7390c6d999689",
            - 4,
            - "t_mid.1430591984365:9c66f4b3f67a973193",
            - 4,
            - "t_mid.1431105168474:f5d294b79df5e97a26",
            - 4,
            - "t_id.539747739369904",
            - 3,
            - "t_mid.1423253619046:ef3da504f704e12448",
            - 3,
            - "t_mid.1424454328414:91f82976dc8196e034",
            - 3,
            - "t_mid.1429967443439:dacb57b0f96b00cb63",
            - 3,
            - "t_mid.1430734315969:e5002ecd489b51cc19",
            - 3,
            - "t_mid.1423229143533:71f3dd0f3714f44232",
            - 2,
            - "t_mid.1429076490131:87feb49fa82041dd77",
            - 2,
            - "t_mid.1429080523489:00a85a2b07980c9a19",
            - 2,
            - "t_mid.1429913551113:5870b4366960dc5c10",
            - 2,
            - "t_mid.1429917749072:7cbdaf3d8c2d15ef78",
            - 2,
            - "t_mid.1429966041997:616561349e22cb7001",
            - 2,
            - "t_mid.1429968203236:bcd0c539ae66947618",
            - 2,
            - "t_mid.1429982604402:6e509023526a0f5b09",
            - 2,
            - "t_mid.1430475210140:8a963390e62e26f497",
            - 2,
            - "t_mid.1430746574833:59b08895c5287a2998",
            - 2,
            - "t_mid.1423229237215:d03fb607be18b2d089",
            - 1,
            - "t_mid.1423256045556:63089c5cc77c800113",
            - 1,
            - "t_mid.1426870505993:a5b69b271bea481730",
            - 1,
            - "t_mid.1428776595760:d5ebc1f3b922952e41",
            - 1,
            - "t_mid.1429079296566:f9f0e4c24071e55444",
            - 1,
            - "t_mid.1429315090481:9b7d59d6d483999d57",
            - 1,
            - "t_mid.1429498786426:04f58597d3f5461330",
            - 1,
            - "t_mid.1429878261810:4bdc3e6442db876c21",
            - 1,
            - "t_mid.1429906605359:0f89faf08295015957",
            - 1,
            - "t_mid.1429915168615:365578d261795d6140",
            - 1,
            - "t_mid.1429968022645:2a362d85be63c2ab95",
            - 1,
            - "t_mid.1429968121564:2effeb664562bd9b26",
            - 1,
            - "t_mid.1429969582192:5aca482f37dca9d843",
            - 1,
            - "t_mid.1429977290539:4e77d3d821bf0f4776",
            - 1,
            - "t_mid.1430402045699:26f80d3b74a2add576",
            - 1,
            - "t_mid.1430475213657:326c6f3cc11c71b369",
            - 1,
            - "t_mid.1430475234751:f314f35654bbae7115",
            - 1,
            - "t_mid.1430475697257:231b8ede3747a1f896",
            - 1,
            - "t_mid.1430475803810:2c195892717d542f14",
            - 1,
            - "t_mid.1430476008512:ea434b9d85dabb2543",
            - 1,
            - "t_mid.1430476659342:a018690840e636d776",
            - 1,
            - "t_mid.1430476885712:e609e656009833de31",
            - 1,
            - "t_mid.1430477079178:bc9d75dabac5dcb511",
            - 1,
            - "t_mid.1430558085444:52661d63f572ce0904",
            - 1,
            - "t_mid.1430558621394:96f33ecead9465cb23",
            - 1,
            - "t_mid.1430580348996:cda354a2f952856728",
            - 1,
            - "t_mid.1430728925543:b515a0ad17f34acd73",
            - 1,
            - "t_mid.1430736355206:41ffdf97b1a5f01a01",
            - 1,
            - "t_mid.1430942867561:2a5483daf3392ab298",
            - 1,
            - "t_mid.1430942868287:1bff7335f468075369",
            - 1,
            - "t_mid.1431072458702:9875302a1ed510ae57",
            - 1,
            - "",
            - 0,
            - "---DCiTtcyw",
            - 0,
            - "---bV94eL4U",
            - 0,
            - "--00lIkaeB8",
            - 0,
            - "--0RUseW4lg",
            - 0,
            - "--0wLq7B_Ws",
            - 0,
            - "--0xfBblqow",
            - 0,
            - "--1fAACqC2c",
            - 0,
            - "--52VtR0C44",
            - 0,
            - "--7xXxOM8vQ",
            - 0,
            - "--C78G2-oTs",
            - 0,
            - "--FdKWJXcEo",
            - 0,
            - "--HhHHdBWXs",
            - 0,
            - "--L0ugLLpvY",
            - 0,
            - "--LFIwCjwE0",
            - 0,
            - "--N4ISYI-4c",
            - 0,
            - "--Q8ofQUKrk",
            - 0,
            - "--QE55lI4F4",
            - 0,
            - "--Qy8-saQtk",
            - 0,
            - "--SX9ixv-vA",
            - 0,
            - "--X8OOASYUs",
            - 0,
            - "--YCVeTC-dc",
            - 0,
            - "--ZPdNDh-eI",
            - 0,
            - "--_IWUZFHQA",
            - 0,
            - "--cRonicvvc",
            - 0,
            - "--e7kpvRJf4",
            - 0,
            - "--efDizMV7I",
            - 0,
            - "--fckqjGKaE",
            - 0,
            - "--jhm8Nmg24",
            - 0,
            - "--jwVkRJdtk",
            - 0,
            - "--kazNJJjZw",
            - 0,
            - "--mWHQstKfc",
            - 0,
            - "--msADpcZ20",
            - 0,
            - "--obOqCxZYU",
            - 0,
            - "--qD-kDccnw",
            - 0,
            - "--qFtajkjhk",
            - 0,
            - "--v2Ds6PCb8",
            - 0,
            - "--v64qr0kls",
            - 0,
            - "--w6WrSi8vw",
            - 0,
            - "--xyf-gH97o",
            - 0,
            - "--yDbzXLxwQ",
            - 0,
            - "--zx4ShEVtg",
            - 0,
            - "-0-gUNz4H_o",
            - 0,
            - "-00QLYId8Pw",
            - 0
            ]
         },
      - facet_dates: { },
      - facet_ranges: { }
      },
   - debug:
   {
      - timing:
      {
         - time: 395103,
         - prepare:
         {
            - time: 0,
            - query:
            {
               - time: 0
               },
            - facet:
            {
               - time: 0
               },
            - mlt:
            {
               - time: 0
               },
            - highlight:
            {
               - time: 0
               },
            - stats:
            {
               - time: 0
               },
            - debug:
            {
               - time: 0
               }
            },
         - process:
         {
            - time: 395103,
            - query:
            {
               - time: 67
               },
            - facet:
            {
               - time: 395036
               },
            - mlt:
            {
               - time: 0
               },
            - highlight:
            {
               - time: 0
               },
            - stats:
            {
               - time: 0
               },
            - debug:
            {
               - time: 0
               }
            }
         }
      }

}

According to this faceting is taking 395036 time. Why its taking *395
seconds* to just calculate facets of 137 records?

Reply via email to