Hi Solr users,

I have the following fields set in my 'schema.xml'.

*** schema.xml ***
 <fields>
  <field name="id" type="text" indexed="true" stored="true" />
  <field name="document_title" type="text" indexed="true" stored="true"
/>
  ...
 </fields>
 <uniqueKey>id</uniqueKey>
 <defaultSearchField>document_title</defaultSearchField>
 <copyField source="document_title" dest="id"/>
*** schema.xml ***

When I add a document with a duplicate title, it gets duplicated (not
sure why)

<add>
<doc>
 <field name="document_title">duplicate</field>
</doc>
<doc>
 <field name="document_title">duplicate</field>
</doc>
</add>

When I add a document with a duplicate title (numeric only), it does not
get duplicated

<add>
<doc>
 <field name="document_title">123</field>
</doc>
<doc>
 <field name="document_title">123</field>
</doc>
</add>

I can ensure duplicates DO NOT get added when using the field type
'string'.
And I can also ensure that they DO get added when using <add allowDups =
"true">.

Why is there a disparity detecting duplicates when using the field type
'text'?

Is this merely a documentation issue or have I missed something here...

Regards,

Ben

Reply via email to