|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-04-26 17:18 UTC] kantumesh at yahoo dot com
Description:
------------
SolrQuery::setFacetMinCount() does not work on field which
have underscore '_' in the field name.
For ex-
$this->_solrQuery->addFacetField("XYZ_Info");
$this->setFacetMinCount(1, "XYZ_Info");
Reproduce code:
---------------
$this->_solrQuery->addFacetField("XYZ_Info");
$this->setFacetMinCount(1, "XYZ_Info");
Expected result:
----------------
query should have f.XYZ_Info.facet.mincount=1
Actual result:
--------------
could see f.<field name>.facet.mincount=1 for all other
fields which do not have an underscore in the name.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 17:00:01 2025 UTC |
I attempted this and I got the correct result. This is the code $q = new SolrQuery(); $q->addFacetField("XYZ_Info"); $q->addFacetField("under_score")->addFacetField("photos"); $q->setFacetMinCount(3, "under_score"); $q->setFacetMinCount(2, "photos"); $q->setFacetMinCount(1, "XYZ_Info"); echo $q->toString(), "\n"; This is the result facet.field=XYZ_Info&facet.field=under_score&facet.field=photos&f.under_score.facet.mincount=3&f.photos.facet.mincount=2&f.XYZ_Info.facet.mincount=1 Which is the expected result