Everything works well but type is predicted as String instead of Date. I
create just plain documents as follows:

            SimpleDateFormat simpleDateFormat = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
            Calendar startDate = new GregorianCalendar(2017, r.nextInt(6),
r.nextInt(28));
            document.addField("custom_start",
simpleDateFormat.format(startDate.getTime()));
            ...
            solrClient.add(document);
            ...
            solrClient.commit();

On Mon, Mar 13, 2017 at 4:44 PM, Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> Any other definitions in that URP chain are triggered?
>
> Are you seeing this in a nested document by any chance?
>
> Regards,
>    Alex.
> ----
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
>
>
> On 13 March 2017 at 10:29, Furkan KAMACI <furkankam...@gmail.com> wrote:
> > Hi,
> >
> > I'm testing schemaless mode of Solr 6.4.2. Solr predicts fields types
> when
> > I generate dummy data and index it to Solr. However I could not make Solr
> > to predict date fields. I tried that:
> >
> >  "custom_start":["2017-05-16T00:00"]
> >
> > which is a date parse result of SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
> >
> > and
> >
> >  "custom_start":["2017-05-16"]
> >
> > from SimpleDateFormat("yyyy-MM-dd");
> >
> > at both scenarios, predicted type is:
> >
> > org.apache.solr.schema.StrField
> >
> > I use fresh version of Solr which does not have custom modifications and
> > has proper solr.ParseDateFieldUpdateProcessorFactory definition.
> >
> > What I'm missing?
> >
> > Kind Regards,
> > Furkan KAMACI
>

Reply via email to