Cataloging absolute_url in text-index and doing searches
Hi all, one question about ZCatalog and indexin absolute-url in text-index. My case: I have a website, where is one folder and it's subfolders protected from anonymous users. Problem was that when I created a catalog aware object, it came present in the public search. I started to solve the problem including absolute_url text_index in Catalog and limit the searches with this absolute_url index. Now my problems started. When I looked at the cataloged index absolute_url was indexed in following way: ('fi/notgood/subdir/file', 'http', '//www', 'foobar') I wanted to limit the search in a way where files in /notgood/ directory would not be presented in response. I tried to do it like this: <dtml-in expr="Catalog({'PrincipiaSearchSource': PrincipiaSearchSource, 'absolute_url' : 'fi/* AND NOT */notgood/*'})" size=30 start=query_start> But it didn't work. More exactly the AND NOT part didn't seem to have any effect. Any idea? -huima
Why not using the PathIndex ? Andreas ----- Original Message ----- From: "Heimo Laukkanen" <huima@fountainpark.org> To: <zope@zope.org> Sent: Tuesday, November 13, 2001 07:36 Subject: [Zope] Cataloging absolute_url in text-index and doing searches
Hi all,
one question about ZCatalog and indexin absolute-url in text-index.
My case: I have a website, where is one folder and it's subfolders protected from anonymous users. Problem was that when I created a catalog aware object, it came present in the public search.
I started to solve the problem including absolute_url text_index in Catalog and limit the searches with this absolute_url index. Now my problems started.
When I looked at the cataloged index absolute_url was indexed in following way: ('fi/notgood/subdir/file', 'http', '//www', 'foobar')
I wanted to limit the search in a way where files in /notgood/ directory would not be presented in response. I tried to do it like this:
<dtml-in expr="Catalog({'PrincipiaSearchSource': PrincipiaSearchSource, 'absolute_url' : 'fi/* AND NOT */notgood/*'})" size=30 start=query_start>
But it didn't work. More exactly the AND NOT part didn't seem to have any effect.
Any idea?
-huima
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Tuesday 13 November 2001 08:19 am, Andreas Jung allegedly wrote:
Why not using the PathIndex ?
Andreas
Since you are using 2.3.x, I would suggest using a keyword index on getPhysicalPath (which is an method available on most all objects which returns the path as a sequence of strings). hth, /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
Casey Duncan wrote:
Since you are using 2.3.x, I would suggest using a keyword index on getPhysicalPath (which is an method available on most all objects which returns the path as a sequence of strings).
I will try that. Thanks. Now just the question why the following didn't work troubles my mind. Any ideas? ,-) <dtml-in expr="Catalog({'PrincipiaSearchSource': PrincipiaSearchSource, 'absolute_url' : 'fi/* AND NOT */notgood/*'})" size=30 start=query_start> -huima
participants (4)
-
Andreas Jung -
Casey Duncan -
Heimo Laukkanen -
Heimo Laukkanen