Proper type(s) for adding a DatePointField value [was: problems with indexing documents]

2019-04-04 Thread Mark H. Wood
One difficulty is that the documentation of SolrInputDocument.addField(String, Object) is not at all specific. I'm aware of SOLR-2298 and I accept that the patch is an improvement, but still... @param value Value of the field, should be of same class type as defined by "type" attribute of the

Re: problems with indexing documents

2019-04-02 Thread Bill Tantzen
Right, as Mark said, this is how the dates were indexed previously. However, instead of passing in the actual String, we passed a java.util.Date object which was automagically converted to the correct string. Now (the code on our end has not changed), solr throws an exception because the string

Re: problems with indexing documents

2019-04-02 Thread Mark H. Wood
I'm also working on this with Bill. On Tue, Apr 02, 2019 at 09:44:16AM +0800, Zheng Lin Edwin Yeo wrote: > Previously, did you index the date in the same format as you are using now, > or in the Solr format of "-MM-DDTHH:MM:SSZ"? As may be seen from the sample code: > > doc.addField (

Re: problems with indexing documents

2019-04-01 Thread Zheng Lin Edwin Yeo
Hi Bill, Previously, did you index the date in the same format as you are using now, or in the Solr format of "-MM-DDTHH:MM:SSZ"? Regards, Edwin On Tue, 2 Apr 2019 at 00:32, Bill Tantzen wrote: > In a legacy application using Solr 4.1 and solrj, I have always been > able to add documents

problems with indexing documents

2019-04-01 Thread Bill Tantzen
In a legacy application using Solr 4.1 and solrj, I have always been able to add documents with TrieDateField types using java.util.Date objects, for instance, doc.addField ( "date", new java.util.Date() ); having recently upgraded to Solr 7.7, and updating my schema to leverage DatePointField