Forums / Developer / Searching with a blank text field

Searching with a blank text field

Author Message

John Robens

Tuesday 30 December 2003 11:12:17 pm

I want to bring up the wild-card, blank text thread again in reference to ez 3.3.

I want to bring back a list of everything in a directory tree, minus a directory. Say I have a directory with news,events,admin in it. I want to be able to browse through all the items in the news and events directories, but ignore admin. I can fetch this out with a tree, and filter out the admin directory, decrementing the item_count so that pagination will still work. In general a mess.

A much tidier and more efficient answer would be to search over just the the directories that I want. So I just want to double-check that it will not be available till 3.4. It is possible that these people would go for a search-extension solution, but ongoing maintenance is to be minimised. So such a thing would create a fear that upgrading would be complicated, or that the extension would have to be fixed.

I have tried in 3.3
- the no-string solution: fetch(content,search,hash())
- the blank string solution: fetch(content,search,hash(text,""))
- the wild-card solution: fetch(content,search,hash(text,"*"))

There is no negation option that I can see. I guess in ez-talk it would be fetch(content,search,hash(text,"abdfasfafd",operator,"not"))

So the search fetch function does not seem to work for me.

There were some notes in the forums:
no-strings.
http://www.ez.no/developer/ez_publish_3/bug_reports/advanced_search_empty_string_but_class_qualified_should_be_allowed/search_heavily_improved_in_32

wild-cards: ttp://www.ez.no/developer/ez_publish_3/bug_reports/search_wildcard_searches_dont_work

Marco Zinn

Wednesday 31 December 2003 10:53:55 am

Hi,
i cannot help you with the searches, as I did not try anything like that yet.
BUT: If you just want to skip one "admin" folder (subtree), you might want to solve this easier and more secure with sections.
When "admin" is some area, which should only be usable by "admins", you could try this (we use this setup):
Create a section ("Admin-Area"). Assign this section to your admin folder, which will assign it recursivly to everything inside.
Then change the "Anonymous" role, so that your users cannot read the content. Usually, Anonymous can read all sections, which you do not want.
Create another role called "Admins" (maybe there is one already) and allow the to read/create/edit/delete everything inside all sections. If you have to create the role, assign it to your "Administrator Users" group.
This is a rough solution and may be refined more, if you have more more user groups.
Note: Always remember to STORE the new role policies!

This should give you, what you need, is very elegant, uses ezPublish permission system and does not require ANY coding.

Marco
http://www.hyperroad-design.com

eZ debug

Timing: Jan 19 2025 09:51:09
Script start
Timing: Jan 19 2025 09:51:09
Module start 'content'
Timing: Jan 19 2025 09:51:10
Module end 'content'
Timing: Jan 19 2025 09:51:10
Script end

Main resources:

Total runtime1.0765 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.9766180.8281
Module start 'content' 0.00740.9369 769.8047533.1875
Module end 'content' 0.94430.1321 1,302.9922332.7422
Script end 1.0765  1,635.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3961210.0002
Check MTime0.00160.1529210.0001
Mysql Total
Database connection0.00090.087110.0009
Mysqli_queries1.000792.95821910.0052
Looping result0.00190.17611890.0000
Template Total1.043196.920.5215
Template load0.00220.199820.0011
Template processing1.040996.692220.5205
Template load and register function0.00020.020610.0002
states
state_id_array0.00210.199110.0021
state_identifier_array0.00170.160120.0009
Override
Cache load0.00150.1359280.0001
Sytem overhead
Fetch class attribute can translate value0.00200.188030.0007
Fetch class attribute name0.00130.120130.0004
XML
Image XML parsing0.00080.075530.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00530.4952270.0002
String conversion0.00000.000630.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs