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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:34:46
Script start
Timing: Jan 19 2025 03:34:46
Module start 'layout'
Timing: Jan 19 2025 03:34:46
Module start 'content'
Timing: Jan 19 2025 03:34:46
Module end 'content'
Timing: Jan 19 2025 03:34:46
Script end

Main resources:

Total runtime0.0150 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 590.2969152.6250
Module start 'layout' 0.00490.0031 742.921939.4609
Module start 'content' 0.00800.0047 782.382889.3359
Module end 'content' 0.01270.0022 871.718834.3047
Script end 0.0149  906.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002717.7925140.0002
Check MTime0.00127.8501140.0001
Mysql Total
Database connection0.00074.431810.0007
Mysqli_queries0.002215.003730.0007
Looping result0.00000.100410.0000
Template Total0.001912.610.0019
Template load0.00117.365610.0011
Template processing0.00085.220610.0008
Override
Cache load0.00064.090810.0006
General
dbfile0.00031.839080.0000
String conversion0.00000.060640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs