Re: [Zope] AND operator and ZCatalog

2000-11-28 Thread The Doctor What

* Michel Pelletier ([EMAIL PROTECTED]) [001128 15:26]:
> Text indexes implicitly Or their search terms if no operator is
> specified.  Don't ask me why, I don't know.
> 
> if you want to change this behavior, edit
> lib/python/SearchIndex/UnTextIndex.py on or about line 451, change the
> 'default_operator' argument to the query method to And:
> 
> def query(self, s, default_operator = Or, ws = (string.whitespace,)):
> 
> to:
> 
> def query(self, s, default_operator = And, ws = (string.whitespace,)):

That's more like what I wanted. :-)

Ciao!

-- 
"You know, if you shoot me, you're liable to lose a lot of those humanitarian awards."
--Fletch (Fletch)

The Doctor What: A Holtje Production http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] AND operator and ZCatalog

2000-11-28 Thread Michel Pelletier

The Doctor What wrote:
> 
> * Dieter Maurer ([EMAIL PROTECTED]) [001127 17:31]:
> > Bak @ kedai writes:
> >  > i have a ZCatalog that indexes news.  i use keyword index, and text index.
> >  > when i try
> >  >
> >  > 
> >  >   .
> >  > it seems that the search was ORed, not ANDed.
> >  >
> >  > i hope i'm clear enough.
> > I tried it out:
> > For me, it was definitely an AND.
> >
> > What I did:
> >   Make a search for "Meta Type=Document Template" => lots of hits.
> >   Add "Title=" to the search => no hits
> >   Add "Title=Elvis" => some hits
> >
> > as I would expect.
> 
> Those are anded, but principiasourcesearch isn't.
> 

Text indexes implicitly Or their search terms if no operator is
specified.  Don't ask me why, I don't know.

if you want to change this behavior, edit
lib/python/SearchIndex/UnTextIndex.py on or about line 451, change the
'default_operator' argument to the query method to And:

def query(self, s, default_operator = Or, ws = (string.whitespace,)):

to:

def query(self, s, default_operator = And, ws = (string.whitespace,)):


-Michel

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] AND operator and ZCatalog

2000-11-28 Thread The Doctor What

* Dieter Maurer ([EMAIL PROTECTED]) [001127 17:31]:
> Bak @ kedai writes:
>  > i have a ZCatalog that indexes news.  i use keyword index, and text index.  
>  > when i try 
>  > 
>  > 
>  >   .
>  > it seems that the search was ORed, not ANDed.  
>  > 
>  > i hope i'm clear enough.
> I tried it out:
> For me, it was definitely an AND.
> 
> What I did:
>   Make a search for "Meta Type=Document Template" => lots of hits.
>   Add "Title=" to the search => no hits
>   Add "Title=Elvis" => some hits
> 
> as I would expect.

Those are anded, but principiasourcesearch isn't.

Searching for: zcatalog fish
http://www.zope.org/SiteIndex/search?date%3Adate=1969%2F12%2F31++16%3A00%3A00+US%2FPacific&date_usage=range%3Amin&text_content=zcatalog+fish

versus: zcatalog AND fish
http://www.zope.org/SiteIndex/search?date%3Adate=1969%2F12%2F31++16%3A00%3A00+US%2FPacific&date_usage=range%3Amin&text_content=zcatalog+AND+fish

Ciao!

-- 
There is no sweeter sound than the crumbling of your fellow man.
-- Groucho Marx

The Doctor What: A really hip dude   http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] AND operator and ZCatalog

2000-11-27 Thread Dieter Maurer

Bak @ kedai writes:
 > i have a ZCatalog that indexes news.  i use keyword index, and text index.  
 > when i try 
 > 
 > 
 >   .
 > it seems that the search was ORed, not ANDed.  
 > 
 > i hope i'm clear enough.
I tried it out:
For me, it was definitely an AND.

What I did:
  Make a search for "Meta Type=Document Template" => lots of hits.
  Add "Title=" to the search => no hits
  Add "Title=Elvis" => some hits

as I would expect.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] AND operator and ZCatalog

2000-11-27 Thread Bak @ kedai

hello
i've read and reread advance ZCatalog howto by Zen, and still failed to do 
what i want.

the situation
i have a ZCatalog that indexes news.  i use keyword index, and text index.  
when i try 



 ">

||


it seems that the search was ORed, not ANDed.  

i hope i'm clear enough.

thanks

-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Strange how laughter looks like crying with no sound, and raindrops taste 
like tears .. without the pain


___
Zope maillist  -  [EMAIL PROTECTED]
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 )