Re: SolrJ: SolrInputDocument.addField()

2021-02-16 Thread Shawn Heisey
On 2/15/2021 10:17 AM, Steven White wrote: Yes, I have managed schema enabled like so: true cp-schema.xml The reason why I enabled it is so that I can dynamically customize the schema based on what's in the DB. So that I can add fields to the schema dynamically. A managed/m

Re: SolrJ: SolrInputDocument.addField()

2021-02-16 Thread Jimi HullegÄrd
Hi Steven, Just a thought, from someone who never have used schema-less mode: Have you considered using a regular schema file, with a bunch of dynamicField definitions? Then you can for example define a dynamic boolean field like this: Then, when you index the data, you can append "_b" to the

Re: SolrJ: SolrInputDocument.addField()

2021-02-15 Thread Steven White
Hi Shawn, Yes, I have managed schema enabled like so: true cp-schema.xml The reason why I enabled it is so that I can dynamically customize the schema based on what's in the DB. So that I can add fields to the schema dynamically. I didn't know about the field "guessing" part. No

Re: SolrJ: SolrInputDocument.addField()

2021-02-15 Thread Shawn Heisey
On 2/15/2021 6:52 AM, Steven White wrote: It looks to me that SolrInputDocument.addField() is either missnamed or isn't well implemented. When it is called on a field that doesn't exist in the schema, it will create that field and give it a type based on the data. Not only that, it will set def

Re: SolrJ: SolrInputDocument.addField()

2021-02-15 Thread Steven White
Thanks Shawn. It looks to me that SolrInputDocument.addField() is either missnamed or isn't well implemented. When it is called on a field that doesn't exist in the schema, it will create that field and give it a type based on the data. Not only that, it will set default values. For example, th

Re: SolrJ: SolrInputDocument.addField()

2021-02-14 Thread Shawn Heisey
On 2/14/2021 9:00 AM, Steven White wrote: It looks like I'm misusing SolrJ API SolrInputDocument.addField() thus I need clarification. Here is an example of what I have in my code: SolrInputDocument doc = new SolrInputDocument(); doc.addField("MyFieldOne", "some data"); doc.addF

SolrJ: SolrInputDocument.addField()

2021-02-14 Thread Steven White
Hi everyone, It looks like I'm misusing SolrJ API SolrInputDocument.addField() thus I need clarification. Here is an example of what I have in my code: SolrInputDocument doc = new SolrInputDocument(); doc.addField("MyFieldOne", "some data"); doc.addField("MyFieldTwo", 100); The abo