Hi,

  I'm looking for some clarification on CollapsingQParserPlugin feature.

Here's what I tried. I downloaded 4.6, updated "solr.xml" under exampledocs
folder and added the following entry. I've added a new field "adskdedup"
on which I'm planning to test field collapsing. As you can see, out of four
documents, three have similar adskdedup values while the last one is
different.

<doc>
  <field name="id">SOLR1000</field>
  <field name="name">Solr, the Enterprise Search Server</field>
  <field name="price">0</field>
  <field name="popularity">10</field>
  <field name="inStock">true</field>
  <field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
  <field name="adskdedup">ABCD-XYZ</field>
</doc>
<doc>
  <field name="id">SOLR1001</field>
  <field name="name">Solr, the Enterprise Search Server</field>
  <field name="price">0</field>
  <field name="popularity">10</field>
  <field name="inStock">true</field>
  <field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
  <field name="adskdedup">ABCD-XYZ</field>
</doc>
<doc>
  <field name="id">SOLR1002</field>
  <field name="name">Solr, the Enterprise Search Server</field>
  <field name="price">0</field>
  <field name="popularity">10</field>
  <field name="inStock">true</field>
  <field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
  <field name="adskdedup">ABCD-XYZ</field>
</doc>
<doc>
  <field name="id">SOLR1003</field>
  <field name="name">Solr, the Enterprise Search Server</field>
  <field name="price">0</field>
  <field name="popularity">10</field>
  <field name="inStock">true</field>
  <field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
  <field name="adskdedup">MNOP-QRS</field>
</doc>

Here's my query :

http://localhost:8983/solr/collection1/select?q=solr&wt=xml&fq={!collapse%20field=adskdedup}

Based on my understanding of using group by, I was expecting couple of
results from the query. One with id=SOLR1000 and the second with
id=SOLR1003. Instead, its returning only 1 result based on the field
collapsing, i.e. id=SOLR1000.

Am I missing something here ?

Any pointer will be appreciated.

-Thanks

Reply via email to