@Jorn Franke

In the link you shared, both replace and delete methods returns an
exception if the field is not already there. I am wondering how to handle
both cases mentioned below.

   - When a fresh collection is created, fieldnames and fieldtypes would
   not already exist. Hence they have to be created.
   - When the index process is run again and again, fieldnames might
   already be defined in the schema. In that case creating part has to be
   ignored.



@Shawn

It is likely to be the issue. Thanks for sharing.

Regards,
Arunan

*Sugunakumar Arunan*
Undergraduate - CSE | UOM

Email : aruna <aru...@wso2.com>ns...@cse.mrt.ac.lk
Mobile : 0094 766016272 <076%20601%206272>
LinkedIn : https://www.linkedin.com/in/arunans23/


On Sun, 20 Jan 2019 at 14:02, Shawn Heisey <apa...@elyograg.org> wrote:

> On 1/19/2019 8:47 PM, Arunan Sugunakumar wrote:
> > I used SolrJ 7.2.1 and Apache Solr 7.2.1 in one of my projects. Prior to
> > data indexing, I create the fields and field types using SchemaAPI in
> > SolrJ. If a same field name is repeated, solr did not return an
> exception,
> > but simply ignored it (or over-rid it). But I tried Solr 7.6.0 with my
> > project and it returned exceptions. I went over the Solr logs and found
> the
> > below error. It seems that I cannot create a field again and again. I
> would
> > like to know whether I should do something different to overcome this
> > problem.
>
> I'm guessing the changed behavior is a result of this issue, first
> released in 7.3.0:
>
> https://issues.apache.org/jira/browse/SOLR-11631
>
> The API call to add a field very likely failed when the field already
> existed in 7.2.1, but Solr was returning a zero status, which would tell
> the client that it succeeded.  Your program would never know there was a
> problem.
>
> Thanks,
> Shawn
>
>

Reply via email to