Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

Searching for a range or a value

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


andrearatto_liste at yahoo

Aug 14, 2008, 1:25 AM

Post #1 of 4 (730 views)
Permalink
Searching for a range or a value

Hi list!
I am trying to search for items with an attribute (a price) in a defined
range, but I also need to match those which have None in that attribute.

The index is a FieldIndex, Zope is at version 2.10

Is there any way to do that without doing two separated queries or
installing specific Products?
Thank you.

Andrea Ratto

_______________________________________________
Zope maillist - Zope [at] zope
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


tseaver at palladion

Aug 14, 2008, 7:31 AM

Post #2 of 4 (710 views)
Permalink
Re: Searching for a range or a value [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrea Ratto wrote:
> Hi list!
> I am trying to search for items with an attribute (a price) in a defined
> range, but I also need to match those which have None in that attribute.
>
> The index is a FieldIndex, Zope is at version 2.10
>
> Is there any way to do that without doing two separated queries or
> installing specific Products?

No. Any query against a standard FieldIndex must be either a range
query (closed or half-open) or query for a specific value.



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIpEG0+gerLs4ltQ4RArgrAJ9r70Oam4lndCpAj7upLdRJwzlgbQCgpPWx
nRKto1o0FbjFWRRQm85g2kE=
=u7aX
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope [at] zope
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


tseaver at palladion

Aug 14, 2008, 7:31 AM

Post #3 of 4 (629 views)
Permalink
Re: Searching for a range or a value [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrea Ratto wrote:
> Hi list!
> I am trying to search for items with an attribute (a price) in a defined
> range, but I also need to match those which have None in that attribute.
>
> The index is a FieldIndex, Zope is at version 2.10
>
> Is there any way to do that without doing two separated queries or
> installing specific Products?

No. Any query against a standard FieldIndex must be either a range
query (closed or half-open) or query for a specific value.



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIpEG0+gerLs4ltQ4RArgrAJ9r70Oam4lndCpAj7upLdRJwzlgbQCgpPWx
nRKto1o0FbjFWRRQm85g2kE=
=u7aX
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope [at] zope
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


dieter at handshake

Aug 16, 2008, 2:09 AM

Post #4 of 4 (698 views)
Permalink
Re: Searching for a range or a value [In reply to]

Andrea Ratto wrote at 2008-8-14 10:25 +0200:
>I am trying to search for items with an attribute (a price) in a defined
>range, but I also need to match those which have None in that attribute.
>
>The index is a FieldIndex, Zope is at version 2.10
>
>Is there any way to do that without doing two separated queries or
>installing specific Products?

One of your options is to forget the restricted ZCatalog API
and use "AdvanceQuery" instead.

It has a "Between" query for your use case (and many other features
and removed bugs).



--
Dieter
_______________________________________________
Zope maillist - Zope [at] zope
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.