Re: index sql databases
On 7/19/2016 4:56 AM, kostali hassan wrote: > I am looking for display for each user: l'utilisateur est crée le > $date à $time not $document-> name est crée le $document->created You'll have to do that in your application that queries Solr, splitting the date and time information that it receives in one field, or you'll have to write a plugin for Solr that overrides the normal output into two fields. The first option is likely much easier. Thanks, Shawn
Re: index sql databases
I am looking for display for each user: l'utilisateur est crée le $date à $time not $document-> name est crée le $document->created 2016-07-18 16:48 GMT+01:00 Erick Erickson: > I don't see how that relates to the original > question. > > bq: when I display the field type date I get the > value in this forme -MM-dd'T'hh:mm:ss'Z' > > A regex in the _input_ side will have > no effect on what Solr returns. You'd have > to use a DocTransformer to change the output > on the query side. DIH is in the indexing side. > > Best, > Erick > > On Mon, Jul 18, 2016 at 2:45 AM, kostali hassan > wrote: > > can we use transformer="RegexTransformer" > > and set in db_data_config.xml > > > groupNames="date_t,time_t" /> > > > > 2016-07-16 18:18 GMT+01:00 Shawn Heisey : > > > >> On 7/15/2016 3:10 PM, kostali hassan wrote: > >> > Thank you Shawn the prb is when I display the field type date I get > >> > the value in this forme -MM-dd'T'hh:mm:ss'Z' > >> > >> Solr only displays ISO date format for date fields -- an example is > >> 2016-07-16T18:17:08.497Z -- and only in the UTC timezone. If you want > >> something else in your application, you'll have to translate it, or > >> you'll have to write a custom plugin to add to Solr that changes the > >> output format. > >> > >> Thanks, > >> Shawn > >> > >> >
Re: index sql databases
I don't see how that relates to the original question. bq: when I display the field type date I get the value in this forme -MM-dd'T'hh:mm:ss'Z' A regex in the _input_ side will have no effect on what Solr returns. You'd have to use a DocTransformer to change the output on the query side. DIH is in the indexing side. Best, Erick On Mon, Jul 18, 2016 at 2:45 AM, kostali hassanwrote: > can we use transformer="RegexTransformer" > and set in db_data_config.xml > groupNames="date_t,time_t" /> > > 2016-07-16 18:18 GMT+01:00 Shawn Heisey : > >> On 7/15/2016 3:10 PM, kostali hassan wrote: >> > Thank you Shawn the prb is when I display the field type date I get >> > the value in this forme -MM-dd'T'hh:mm:ss'Z' >> >> Solr only displays ISO date format for date fields -- an example is >> 2016-07-16T18:17:08.497Z -- and only in the UTC timezone. If you want >> something else in your application, you'll have to translate it, or >> you'll have to write a custom plugin to add to Solr that changes the >> output format. >> >> Thanks, >> Shawn >> >>
Re: index sql databases
can we use transformer="RegexTransformer" and set in db_data_config.xml 2016-07-16 18:18 GMT+01:00 Shawn Heisey: > On 7/15/2016 3:10 PM, kostali hassan wrote: > > Thank you Shawn the prb is when I display the field type date I get > > the value in this forme -MM-dd'T'hh:mm:ss'Z' > > Solr only displays ISO date format for date fields -- an example is > 2016-07-16T18:17:08.497Z -- and only in the UTC timezone. If you want > something else in your application, you'll have to translate it, or > you'll have to write a custom plugin to add to Solr that changes the > output format. > > Thanks, > Shawn > >
Re: index sql databases
On 7/15/2016 3:10 PM, kostali hassan wrote: > Thank you Shawn the prb is when I display the field type date I get > the value in this forme -MM-dd'T'hh:mm:ss'Z' Solr only displays ISO date format for date fields -- an example is 2016-07-16T18:17:08.497Z -- and only in the UTC timezone. If you want something else in your application, you'll have to translate it, or you'll have to write a custom plugin to add to Solr that changes the output format. Thanks, Shawn
Re: index sql databases
Thank you Shawn the prb is when I display the field type date I get the value in this forme -MM-dd'T'hh:mm:ss'Z'
Re: index sql databases
On 7/15/2016 12:42 PM, kostali hassan wrote: > I use solr5.4.1 when a attribute the type date is null (:00:00) > the processus of indexation stop and the log had an Error , how i have > to change in driver="com.mysql.jdbc.Driver" to ignore null date; Last > question how to set dateTimeFormat="-MM-dd'T'hh:mm:ss'Z'" /> to to field > date and time< hh:mm:ss> An all-zero date is NOT a null date. This is a valid date for MySQL, but it is not a valid date for Solr, and Solr will complain about it. You need to add a parameter to your JDBC URL to set zero dates to null, so the field will not be present in the Solr document. I am using this parameter in my URL definition: url="jdbc:mysql://${dih.request.dbHost}:3306/${dih.request.dbSchema}?zeroDateTimeBehavior=convertToNull" I have no idea what you are trying to do with that tag. If the MySQL field is a date/time field, JDBC will typically put it into the correct format for Solr date field types. About the only thing that mightgo wrong is timezones -- you may need to explicitly set the timezone with MySQL url parameters. Thanks, Shawn
index sql databases
I use solr5.4.1 when a attribute the type date is null (:00:00) the processus of indexation stop and the log had an Error , how i have to change in driver="com.mysql.jdbc.Driver" to ignore null date; Last question how to set to to field date and time< hh:mm:ss>