lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Furkan KAMACI <furkankam...@gmail.com>
Subject Re: Predicting Date Field at Schemaless Mode
Date Mon, 13 Mar 2017 15:09:39 GMT
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 <arafalov@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 <furkankamaci@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message