You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Luis Cappa Banda <lu...@gmail.com> on 2014/01/20 21:08:04 UTC

Facet count mismatch.

Hello!

I've installed a classical two shards Solr 4.5 topology without SolrCloud
balancing with an HA proxy. I've got a *copyField* like this:

* <field name="tagValues" type="string" indexed="true" stored="true"
multiValued="false"/>*

Copied from this one:

* <field name="tags" type="searchableTextTokenized" indexed="true"
stored="true" multiValued="false"/>*

* <!-- Fieldtype used in fields available to test searching -->*
*    <fieldType name="searchableTextTokenized" class="solr.TextField"
positionIncrementGap="100">*
* <analyzer>*
* <tokenizer class="solr.PatternTokenizerFactory"
pattern="[\s\t\n\?\!\¿\¡:,;@\\.,\\(\\)\\{\\}\\/\\-]+" />*
* <filter class="solr.ASCIIFoldingFilterFactory"/>*
* <filter class="solr.LowerCaseFilterFactory"/>*
* <filter class="solr.ReversedWildcardFilterFactory"/>*
* <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>*
* </analyzer>      *
*    </fieldType>*


When faceting with *tagValues* field I've got a total count of 3:


   - facet_counts:
   {
      - facet_queries: { },
      - facet_fields:
      {
         - tagsValues:
         [
            - "sucks",
            - 3
            ]
         },
      - facet_dates: { },
      - facet_ranges: { }
      }



Bug when searching like this with *tagValues* the total number of documents
is not three, but two:



   - params:
   {
      - facet: "true",
      - shards:
      "solr1.test:8081/comments/data,solr2.test:8080/comments/data",
      - facet.mincount: "1",
      - facet.sort: "count",
      - q: "tagsValues:"sucks"",
      - facet.limit: "-1",
      - facet.field: "tagsValues",
      - wt: "json"
      }



Any idea of what's happening here? I'm confused, :-/

Regards,


-- 
- Luis Cappa

Re: Facet count mismatch.

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Luis,

Do you have deletions? What happens when you expunge Deletes?

http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22commit.22

Ahmet


On Monday, January 20, 2014 10:08 PM, Luis Cappa Banda <lu...@gmail.com> wrote:

Hello!

I've installed a classical two shards Solr 4.5 topology without SolrCloud
balancing with an HA proxy. I've got a *copyField* like this:

* <field name="tagValues" type="string" indexed="true" stored="true"
multiValued="false"/>*

Copied from this one:

* <field name="tags" type="searchableTextTokenized" indexed="true"
stored="true" multiValued="false"/>*

* <!-- Fieldtype used in fields available to test searching -->*
*    <fieldType name="searchableTextTokenized" class="solr.TextField"
positionIncrementGap="100">*
* <analyzer>*
* <tokenizer class="solr.PatternTokenizerFactory"
pattern="[\s\t\n\?\!\¿\¡:,;@\\.,\\(\\)\\{\\}\\/\\-]+" />*
* <filter class="solr.ASCIIFoldingFilterFactory"/>*
* <filter class="solr.LowerCaseFilterFactory"/>*
* <filter class="solr.ReversedWildcardFilterFactory"/>*
* <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>*
* </analyzer>      *
*    </fieldType>*


When faceting with *tagValues* field I've got a total count of 3:


   - facet_counts:
   {
      - facet_queries: { },
      - facet_fields:
      {
         - tagsValues:
         [
            - "sucks",
            - 3
            ]
         },
      - facet_dates: { },
      - facet_ranges: { }
      }



Bug when searching like this with *tagValues* the total number of documents
is not three, but two:



   - params:
   {
      - facet: "true",
      - shards:
      "solr1.test:8081/comments/data,solr2.test:8080/comments/data",
      - facet.mincount: "1",
      - facet.sort: "count",
      - q: "tagsValues:"sucks"",
      - facet.limit: "-1",
      - facet.field: "tagsValues",
      - wt: "json"
      }



Any idea of what's happening here? I'm confused, :-/

Regards,


-- 
- Luis Cappa