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.