lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei <weiwan...@gmail.com>
Subject Re: facet.method=uif not working in solr cloud?
Date Thu, 01 Feb 2018 00:16:56 GMT
Thanks Alessandro. Totally agree that from the logic I can't see why the
requested facet.method=uif is not accepted. I don't see anything in
solr.log also.  However I find that the uif method somehow works with json
facet api in cloud mode,  e.g:

curl http://mysolrcloud:8983/solr/mycollection/select -d
'q=*:*&wt=json&rows=0&json.facet={color: {type: terms, field : color,
method : uif, limit:1000, mincount:1}}&debugQuery=true'

Then in the debug response I see:

"facet-trace":{

   - "processor":"FacetQueryProcessor",
   - "elapse":453,
   - "query":null,
   - "domainSize":70215,
   - "sub-facet":[
      1. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":1,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":7166
      },
      2. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":1,
         - "field":"color",
         - "limit":1000
         - "numBuckets":19,
         - "domainSize":7004
      },
      3. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":2,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":7030
      },
      4. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":80,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":6969
      },
      5. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":85,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":6953
      },
      6. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":85,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":6901
      },
      7. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":93,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":20,
         - "domainSize":6951
      },
      8. {
         - "processor":"FacetFieldProcessorByArrayUIF",
         - "elapse":104,
         - "field":"color",
         - "limit":1000,
         - "numBuckets":19,
         - "domainSize":7127
      }
   ]

A few things puzzled me here.  Looks like when using the json facet api,
SimpleFacets is not used, replaced by FacetFieldPorcessorByArrayUIF
processor. Is that the expected behavior? Also with uif method applied,
facet latency is greatly increased.  Some shards have much bigger elapse
time reported ( 104 vs 1),  I wonder what could cause the discrepancy as my
index in different shards are evenly distributed.

Thanks,
Wei


On Wed, Jan 31, 2018 at 2:24 AM, Alessandro Benedetti <a.benedetti@sease.io>
wrote:

> I worked personally on the SimpleFacets class which does the facet method
> selection :
>
> FacetMethod appliedFacetMethod = selectFacetMethod(field,
>                                 sf, requestedMethod, mincount,
>                                 exists);
>
>     RTimer timer = null;
>     if (fdebug != null) {
>        fdebug.putInfoItem("requestedMethod", requestedMethod==null?"not
> specified":requestedMethod.name());
>        fdebug.putInfoItem("appliedMethod", appliedFacetMethod.name());
>        fdebug.putInfoItem("inputDocSetSize", docs.size());
>        fdebug.putInfoItem("field", field);
>        timer = new RTimer();
>     }
>
> Within the select facet method , the only code block related UIF is (
> another block can apply when facet method arrives null to the Solr Node,
> but
> that should not apply as we see the facet method in the debug):
>
> /* UIF without DocValues can't deal with mincount=0, the reason is because
>          we create the buckets based on the values present in the result
> set.
>          So we are not going to see facet values which are not in the
> result
> set */
>      if (method == FacetMethod.UIF
>          && !field.hasDocValues() && mincount == 0) {
>        method = field.multiValued() ? FacetMethod.FC : FacetMethod.FCS;
>      }
>
> So is there anything in the logs?
> Because that seems to me the only point where you can change from UIF to FC
> and you clearly have mincount=1.
>
>
>
>
>
> -----
> ---------------
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message