Forums / Extensions / eZ Find / Is $search_date available for ezfind?

Is $search_date available for ezfind?

Author Message

laurent le cadet

Thursday 03 January 2008 5:03:55 am

Hi,

$search_date var doesn't seems to talk to ezfind.

I'm using ezfind 1.0.2 + ezPublish 3.9.4.

Reagrds.

Laurent

Kåre Køhler Høvik

Monday 14 January 2008 6:23:13 am

Hi

$search_date is not available. This might be something we forgot to include from the regular search in eZ Publish. Can you point me to existing documentation, or more information about it ?

Kåre

Kåre Høvik

Fredrik Ardmar

Saturday 19 January 2008 9:06:47 pm

Any news regarding this? Thinking of implementing it myself but if its included in future version that might be a more attractive option:)

http://www.areadigital.org

Custom google maps with eZ Publish

http://www.meresverige.dk
http://dsbfirst.meresverige.dk

Kåre Køhler Høvik

Monday 21 January 2008 12:35:29 am

Hi

$search_date will not be supported directly in eZ Find 1.1. However, it's possible to implement the same functionality using filters in eZ Find 1.1. I'll add how to emulate the search_date parameter with filers in the documentation for eZ Find 1.1

Btw, if there's functionality you'd like to see in future versions of eZ Find, please use the issue tracker: http://issues.ez.no/ProjectSelect.php?Id=8

Best regards
Kåre

Kåre Høvik

Josh Apostolides

Sunday 22 June 2008 12:27:55 pm

$search_date would be nice to have in my situation. I have turned the advanced search into a "document library" search function where eZ Find indexes the contents of several thousand pdf and doc files. Is it possible to implement your search filter technique in a eZ Publish 4 + eZ Find 1.0.0beta2 installation?

Gilles Ballini

Thursday 07 August 2008 7:30:06 am

Hi,
for those who are interested, I made a patch of ezfind_1.0.0beta2 (for eZ v.4) to make this functionnality available.

Here is the patch (file extension/ezfind/search/plugins/ezsolr/ezsolr.php) :

481a482,505
+
+ /* BEGIN PATCH : make $search_date available */
+ if (isset($params['SearchDate']) && $params['SearchDate'] > 0 ) {
+ $searchDateTime = new DateTime('today');
+ switch ($params['SearchDate']) {
+ case 1: // one day
+ $searchDateTime->modify("-1 day");
+ break;
+ case 2: // one week
+ $searchDateTime->modify("-1 week");
+ break;
+ case 3: // one month
+ $searchDateTime->modify("-1 month");
+ break;
+ case 4: // 3 months
+ $searchDateTime->modify("-3 months");
+ break;
+ case 5: // one year
+ $searchDateTime->modify("-1 year");
+ break;
+ }
+ $filterQuery[] = 'm_published:['.$searchDateTime->format('U').' TO *]';
+ }
+ /* END PATCH */

eZ debug

Timing: Jan 30 2025 00:54:52
Script start
Timing: Jan 30 2025 00:54:52
Module start 'content'
Timing: Jan 30 2025 00:54:52
Module end 'content'
Timing: Jan 30 2025 00:54:52
Script end

Main resources:

Total runtime0.2430 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.0781180.7734
Module start 'content' 0.00740.0167 768.851698.9766
Module end 'content' 0.02410.2188 867.8281527.6250
Script end 0.2429  1,395.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.5200200.0002
Check MTime0.00140.5854200.0001
Mysql Total
Database connection0.00080.321010.0008
Mysqli_queries0.184375.83181410.0013
Looping result0.00110.46421390.0000
Template Total0.218389.810.2183
Template load0.00100.408310.0010
Template processing0.217389.431410.2173
Override
Cache load0.00070.272910.0007
Sytem overhead
Fetch class attribute can translate value0.00090.360510.0009
XML
Image XML parsing0.00030.112010.0003
General
dbfile0.01335.4770200.0007
String conversion0.00000.002530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs