<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: problem with date search in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313567#M568</link>
    <description>&lt;P&gt;[Greg Drayon](https&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2015 11:48:53 GMT</pubDate>
    <dc:creator>ITShine_</dc:creator>
    <dc:date>2015-11-24T11:48:53Z</dc:date>
    <item>
      <title>problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313563#M564</link>
      <description>&lt;P&gt;I've imported some data using CSV import, configured folder to search for specific metadata using Administration -&amp;gt; Local configuration -&amp;gt; Document content configuration , so when filtering date, sometimes it gives results sometimes not. I've attached the document i'm using to import data. Please note that i'm using french date format. Does anyone faced this problem ? Are there a solution ?&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;This is the code i'm using for search&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;contentView name="parent_accuse_de_reception_content"&amp;gt;

      &amp;lt;title&amp;gt;label.contentview.accuse_de_receptions_content&amp;lt;/title&amp;gt;
      &amp;lt;translateTitle&amp;gt;true&amp;lt;/translateTitle&amp;gt;
      &amp;lt;showTitle&amp;gt;false&amp;lt;/showTitle&amp;gt;

      &amp;lt;coreQueryPageProvider&amp;gt;
        &amp;lt;property name="coreSession"&amp;gt;#{documentManager}&amp;lt;/property&amp;gt;
        &amp;lt;property name="maxResults"&amp;gt;DEFAULT_NAVIGATION_RESULTS&amp;lt;/property&amp;gt;
        &amp;lt;whereClause docType="accuse_de_reception_search"&amp;gt;
          &amp;lt;predicate parameter="adr:num_facture" operator="ILIKE"&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="num_facture" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
          &amp;lt;predicate parameter="bcbase:num_bc" operator="ILIKE"&amp;gt;
            &amp;lt;field schema="bc_base" name="num_bc" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
		  &amp;lt;predicate parameter="adr:date_comptabilisation" operator="="&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="date_comptabilisation" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
          &amp;lt;predicate parameter="adr:date_echeance" operator="="&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="date_echeance" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
		  &amp;lt;predicate parameter="adr:client" operator="ILIKE"&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="client" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
		  &amp;lt;predicate parameter="adr:ville" operator="ILIKE"&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="ville" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
		  &amp;lt;predicate parameter="adr:montant" operator="="&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="montant" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
		  &amp;lt;predicate parameter="adr:code_article" operator="ILIKE"&amp;gt;
            &amp;lt;field schema="accuse_de_reception_search" name="code_article" /&amp;gt;
          &amp;lt;/predicate&amp;gt;
         
          &amp;lt;fixedPart&amp;gt;
                ecm:isCheckedInVersion = 0 AND
				ecm:mixinType != 'HiddenInNavigation' AND 
				ecm:currentLifeCycleState != 'deleted' AND ecm:parentId = ? AND
				ecm:primaryType = 'accuse_de_reception' 
          &amp;lt;/fixedPart&amp;gt;
			&amp;lt;sort column="dc:title" ascending="true" /&amp;gt;
        
		
        &amp;lt;/whereClause&amp;gt;
		
        &amp;lt;parameter&amp;gt;#{currentDocument.id}&amp;lt;/parameter&amp;gt;
		&amp;lt;pageSize&amp;gt;20&amp;lt;/pageSize&amp;gt;		
      &amp;lt;/coreQueryPageProvider&amp;gt;

      &amp;lt;showPageSizeSelector&amp;gt;true&amp;lt;/showPageSizeSelector&amp;gt;
      &amp;lt;useGlobalPageSize&amp;gt;false&amp;lt;/useGlobalPageSize&amp;gt;
      &amp;lt;refresh&amp;gt;
        &amp;lt;event&amp;gt;documentChanged&amp;lt;/event&amp;gt;
        &amp;lt;event&amp;gt;documentChildrenChanged&amp;lt;/event&amp;gt;
      &amp;lt;/refresh&amp;gt;
      &amp;lt;cacheKey&amp;gt;#{currentDocument.repositoryName}_#{currentDocument.id}&amp;lt;/cacheKey&amp;gt;
      &amp;lt;cacheSize&amp;gt;10&amp;lt;/cacheSize&amp;gt;

      &amp;lt;searchLayout name="accuse_de_reception_filter" filterDisplayType="quick" /&amp;gt;
      &amp;lt;showFilterForm&amp;gt;true&amp;lt;/showFilterForm&amp;gt;

      &amp;lt;resultLayouts&amp;gt;
        &amp;lt;layout name="accuse_de_reception_listing_ajax" title="document_listing"
          translateTitle="true" iconPath="/icons/document_listing_icon.png"
          showCSVExport="true" showPDFExport="false" showEditColumns="true" 
          showSyndicationLinks="true" /&amp;gt;
		  &amp;lt;layout iconPath="/icons/document_listing_icon_2_columns_icon.png" 
		  name="document_listing_thumbnail" showEditRows="true" 
		  showSpreadsheet="true" title="document_thumbnail_listing" 
		  translateTitle="true" /&amp;gt;
      &amp;lt;/resultLayouts&amp;gt;

      &amp;lt;selectionList&amp;gt;CURRENT_SELECTION&amp;lt;/selectionList&amp;gt;
      &amp;lt;actions category="CURRENT_SELECTION_LIST" /&amp;gt;
    &amp;lt;/contentView&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2015 09:23:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313563#M564</guid>
      <dc:creator>ITShine_</dc:creator>
      <dc:date>2015-10-27T09:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313564#M565</link>
      <description>&lt;P&gt;You create documents using the CSV import, then you try filtering them. When it does not work, have your created documents the right date for the "adr:date_comptabilisation" and/or "adr:date_echeance" metadata?
Also, looking at this page: &lt;A href="https://github.com/nuxeo/nuxeo-csv/blob/master/src/test/resources/docs_ok.csv" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-csv/blob/master/src/test/resources/docs_ok.csv&lt;/A&gt;, I see that the dates columns do have quotes, whereas your example doesn't have quotes surrounding the dates. BUT the page does not use the French date format. So as you have csv, can you create/generate it with another date format?&lt;/P&gt;
&lt;P&gt;If you can't, I guess you use the CSV Importer nearly the way it is used here: &lt;A href="https://github.com/nuxeo/nuxeo-csv/blob/master/src/test/java/org/nuxeo/ecm/csv/TestCSVImport.java" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-csv/blob/master/src/test/java/org/nuxeo/ecm/csv/TestCSVImport.java&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I see this at lines 93-96:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;CSVImporterOptions options = CSVImporterOptions.DEFAULT_OPTIONS; TransactionHelper.commitOrRollbackTransaction(); String importId = csvImporter.launchImport(session, "/", getCSVFile(DOCS_OK_CSV), DOCS_OK_CSV, options);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;In the CSVImporterOptions class (https://github.com/nuxeo/nuxeo-csv/blob/master/src/main/java/org/nuxeo/ecm/csv/CSVImporterOptions.java), there is a "dateFormat" attribute. Maybe you can create your own options class with the right dateFormat ("dd/MM/yyyy")?&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 09:47:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313564#M565</guid>
      <dc:creator>Greg_Drayon</dc:creator>
      <dc:date>2015-11-12T09:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313565#M566</link>
      <description>&lt;P&gt;[Greg Drayon](https&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 12:50:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313565#M566</guid>
      <dc:creator>ITShine_</dc:creator>
      <dc:date>2015-11-12T12:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313566#M567</link>
      <description>&lt;P&gt;Maybe the problem doesn't come from the CSVImporter.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 15:21:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313566#M567</guid>
      <dc:creator>Greg_Drayon</dc:creator>
      <dc:date>2015-11-12T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313567#M568</link>
      <description>&lt;P&gt;[Greg Drayon](https&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 11:48:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313567#M568</guid>
      <dc:creator>ITShine_</dc:creator>
      <dc:date>2015-11-24T11:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date search</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313568#M569</link>
      <description>&lt;P&gt;The query you run seems different from the one run by the contentView. I would enable the logs for the ```&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2015 14:16:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/problem-with-date-search/m-p/313568#M569</guid>
      <dc:creator>Greg_Drayon</dc:creator>
      <dc:date>2015-11-27T14:16:04Z</dc:date>
    </item>
  </channel>
</rss>

