talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

possible to search by a range of floats?

JM
Jesse Martinez
Thu, Apr 25, 2013 7:42 PM

Hi all,

I set up a field constrained to float values and configured it to search by
a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )
DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC
DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception
org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision
Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
Position: 386

Hi all, I set up a field constrained to float values and configured it to search by a range in advanced search. This breaks when I search by any value other than whole values (integers). Is this a known limitation on using ranged search? Here's the error message: DEBUG [http-8180-2] [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) ) DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] Executing NXQL query: SELECT * FROM Valuationcontrol WHERE collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY collectionspace_core:updatedAt DESC DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] Caught exception org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: operator does not exist: character varying >= double precision Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 386
PS
Patrick Schmitz
Thu, Apr 25, 2013 9:21 PM

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] *On
Behalf Of *Jesse
Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search by
a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

Is valuationcontrols_common:valueAmount defined as a double/float (xs:decimal), or as text (xs:string)? If it follows the pattern we have for purchase price, etc., then it is xs:decimal, and should work. If it is text (xs:string) then I think that is why the postgres interpreter is confused. If it is defined in the xsd as a decimal, then we need to look at the NXQL we are generating. Another option is to add an implicit cast to postgres, as per the following: http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts http://www.postgresql.org/docs/9.2/static/sql-createcast.html However, I think this is not what you want. Patrick *From:* Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf Of *Jesse Martinez *Sent:* Thursday, April 25, 2013 12:43 PM *To:* CollectionSpace Talk List *Subject:* [Talk] possible to search by a range of floats? Hi all, I set up a field constrained to float values and configured it to search by a range in advanced search. This breaks when I search by any value other than whole values (integers). Is this a known limitation on using ranged search? Here's the error message: DEBUG [http-8180-2] [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) ) DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] Executing NXQL query: SELECT * FROM Valuationcontrol WHERE collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY collectionspace_core:updatedAt DESC DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] Caught exception org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: operator does not exist: character varying >= double precision Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 386
JM
Jesse Martinez
Thu, Apr 25, 2013 9:28 PM

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.eduwrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the
following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf
Of *Jesse Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search
by a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

Ooh, I should have mentioned this earlier. I have the field defined as a float... I'll change it to a decimal type and try that next. I'll update with my results. - Jesse On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu>wrote: > Is valuationcontrols_common:valueAmount defined as a double/float > (xs:decimal), or as text (xs:string)? If it follows the pattern we have for > purchase price, etc., then it is xs:decimal, and should work. If it is text > (xs:string) then I think that is why the postgres interpreter is confused. > > > > If it is defined in the xsd as a decimal, then we need to look at the NXQL > we are generating. > > > > Another option is to add an implicit cast to postgres, as per the > following: > > > http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts > > http://www.postgresql.org/docs/9.2/static/sql-createcast.html > > > > However, I think this is not what you want. > > > > Patrick > > > > > > *From:* Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf > Of *Jesse Martinez > *Sent:* Thursday, April 25, 2013 12:43 PM > *To:* CollectionSpace Talk List > *Subject:* [Talk] possible to search by a range of floats? > > > > Hi all, > > > > I set up a field constrained to float values and configured it to search > by a range in advanced search. This breaks when I search by any value other > than whole values (integers). Is this a known limitation on using ranged > search? > > > > Here's the error message: > > > > DEBUG [http-8180-2] > [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] > The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( > (valuationcontrols_common:valueAmount >= 100.00) ) > > DEBUG [http-8180-2] > [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] > Executing NXQL query: SELECT * FROM Valuationcontrol WHERE > collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> > 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND > ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY > collectionspace_core:updatedAt DESC > > DEBUG [http-8180-2] > [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] > Caught exception > > org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: > operator does not exist: character varying >= double precision > > Hint: No operator matches the given name and argument type(s). You might > need to add explicit type casts. > > Position: 386 > > >
JM
Jesse Martinez
Thu, Apr 25, 2013 9:45 PM

This works, thanks, Patrick.

(The field was originally defined as a string -- I made a mistake in my
previous email)

On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez mjesse@gmail.com wrote:

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.eduwrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the
NXQL we are generating.

Another option is to add an implicit cast to postgres, as per the
following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf
Of *Jesse Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search
by a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You
might need to add explicit type casts.

Position: 386

This works, thanks, Patrick. (The field was originally defined as a string -- I made a mistake in my previous email) On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez <mjesse@gmail.com> wrote: > Ooh, I should have mentioned this earlier. I have the field defined as a > float... I'll change it to a decimal type and try that next. I'll update > with my results. > > - Jesse > > > On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu>wrote: > >> Is valuationcontrols_common:valueAmount defined as a double/float >> (xs:decimal), or as text (xs:string)? If it follows the pattern we have for >> purchase price, etc., then it is xs:decimal, and should work. If it is text >> (xs:string) then I think that is why the postgres interpreter is confused. >> >> >> >> If it is defined in the xsd as a decimal, then we need to look at the >> NXQL we are generating. >> >> >> >> Another option is to add an implicit cast to postgres, as per the >> following: >> >> >> http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts >> >> http://www.postgresql.org/docs/9.2/static/sql-createcast.html >> >> >> >> However, I think this is not what you want. >> >> >> >> Patrick >> >> >> >> >> >> *From:* Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf >> Of *Jesse Martinez >> *Sent:* Thursday, April 25, 2013 12:43 PM >> *To:* CollectionSpace Talk List >> *Subject:* [Talk] possible to search by a range of floats? >> >> >> >> Hi all, >> >> >> >> I set up a field constrained to float values and configured it to search >> by a range in advanced search. This breaks when I search by any value other >> than whole values (integers). Is this a known limitation on using ranged >> search? >> >> >> >> Here's the error message: >> >> >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] >> The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( >> (valuationcontrols_common:valueAmount >= 100.00) ) >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] >> Executing NXQL query: SELECT * FROM Valuationcontrol WHERE >> collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> >> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND >> ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY >> collectionspace_core:updatedAt DESC >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] >> Caught exception >> >> org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: >> operator does not exist: character varying >= double precision >> >> Hint: No operator matches the given name and argument type(s). You >> might need to add explicit type casts. >> >> Position: 386 >> >> >> > >
PS
Patrick Schmitz
Thu, Apr 25, 2013 9:51 PM

That was easy – glad to help ;-)

From: Jesse Martinez [mailto:mjesse@gmail.com]
Sent: Thursday, April 25, 2013 2:46 PM
To: Patrick Schmitz
Cc: CollectionSpace Talk List
Subject: Re: [Talk] possible to search by a range of floats?

This works, thanks, Patrick.

(The field was originally defined as a string -- I made a mistake in my
previous email)

On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez mjesse@gmail.com wrote:

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] *On
Behalf Of *Jesse
Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search by
a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

That was easy – glad to help ;-) *From:* Jesse Martinez [mailto:mjesse@gmail.com] *Sent:* Thursday, April 25, 2013 2:46 PM *To:* Patrick Schmitz *Cc:* CollectionSpace Talk List *Subject:* Re: [Talk] possible to search by a range of floats? This works, thanks, Patrick. (The field was originally defined as a string -- I made a mistake in my previous email) On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez <mjesse@gmail.com> wrote: Ooh, I should have mentioned this earlier. I have the field defined as a float... I'll change it to a decimal type and try that next. I'll update with my results. - Jesse On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu> wrote: Is valuationcontrols_common:valueAmount defined as a double/float (xs:decimal), or as text (xs:string)? If it follows the pattern we have for purchase price, etc., then it is xs:decimal, and should work. If it is text (xs:string) then I think that is why the postgres interpreter is confused. If it is defined in the xsd as a decimal, then we need to look at the NXQL we are generating. Another option is to add an implicit cast to postgres, as per the following: http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts http://www.postgresql.org/docs/9.2/static/sql-createcast.html However, I think this is not what you want. Patrick *From:* Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf Of *Jesse Martinez *Sent:* Thursday, April 25, 2013 12:43 PM *To:* CollectionSpace Talk List *Subject:* [Talk] possible to search by a range of floats? Hi all, I set up a field constrained to float values and configured it to search by a range in advanced search. This breaks when I search by any value other than whole values (integers). Is this a known limitation on using ranged search? Here's the error message: DEBUG [http-8180-2] [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) ) DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] Executing NXQL query: SELECT * FROM Valuationcontrol WHERE collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY collectionspace_core:updatedAt DESC DEBUG [http-8180-2] [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] Caught exception org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: operator does not exist: character varying >= double precision Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 386
JM
Jesse Martinez
Fri, Apr 26, 2013 4:59 PM

Just a quick followup...

Can the objectNameProperty tag value in tenant-bindings only be of a string
type? I get an error in the search results when I use a decimal type field.
This is likely related to my earlier message on the list and documented
in CSPACE-5763.

2013-04-26 12:47:17,911 DEBUG [http-8180-4]
[org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151]
Caught exception
java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.String
at
org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144)
at
org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252)

On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz pschmitz@berkeley.eduwrote:

That was easy – glad to help ;-)

From: Jesse Martinez [mailto:mjesse@gmail.com]
Sent: Thursday, April 25, 2013 2:46 PM
To: Patrick Schmitz
Cc: CollectionSpace Talk List
Subject: Re: [Talk] possible to search by a range of floats?

This works, thanks, Patrick.

(The field was originally defined as a string -- I made a mistake in my
previous email)

On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez mjesse@gmail.com wrote:

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the
following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf
Of *Jesse Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search
by a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

Just a quick followup... Can the objectNameProperty tag value in tenant-bindings only be of a string type? I get an error in the search results when I use a decimal type field. This is likely related to my earlier message on the list and documented in CSPACE-5763. 2013-04-26 12:47:17,911 DEBUG [http-8180-4] [org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151] Caught exception java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String at org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182) at org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245) at org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144) at org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252) On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz <pschmitz@berkeley.edu>wrote: > That was easy – glad to help ;-) > > > > *From:* Jesse Martinez [mailto:mjesse@gmail.com] > *Sent:* Thursday, April 25, 2013 2:46 PM > *To:* Patrick Schmitz > *Cc:* CollectionSpace Talk List > *Subject:* Re: [Talk] possible to search by a range of floats? > > > > This works, thanks, Patrick. > > > > (The field was originally defined as a string -- I made a mistake in my > previous email) > > > > On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez <mjesse@gmail.com> wrote: > > Ooh, I should have mentioned this earlier. I have the field defined as a > float... I'll change it to a decimal type and try that next. I'll update > with my results. > > > > - Jesse > > > > On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu> > wrote: > > Is valuationcontrols_common:valueAmount defined as a double/float > (xs:decimal), or as text (xs:string)? If it follows the pattern we have for > purchase price, etc., then it is xs:decimal, and should work. If it is text > (xs:string) then I think that is why the postgres interpreter is confused. > > > > If it is defined in the xsd as a decimal, then we need to look at the NXQL > we are generating. > > > > Another option is to add an implicit cast to postgres, as per the > following: > > > http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts > > http://www.postgresql.org/docs/9.2/static/sql-createcast.html > > > > However, I think this is not what you want. > > > > Patrick > > > > > > *From:* Talk [mailto:talk-bounces@lists.collectionspace.org] *On Behalf > Of *Jesse Martinez > *Sent:* Thursday, April 25, 2013 12:43 PM > *To:* CollectionSpace Talk List > *Subject:* [Talk] possible to search by a range of floats? > > > > Hi all, > > > > I set up a field constrained to float values and configured it to search > by a range in advanced search. This breaks when I search by any value other > than whole values (integers). Is this a known limitation on using ranged > search? > > > > Here's the error message: > > > > DEBUG [http-8180-2] > [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] > The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( > (valuationcontrols_common:valueAmount >= 100.00) ) > > DEBUG [http-8180-2] > [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] > Executing NXQL query: SELECT * FROM Valuationcontrol WHERE > collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> > 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND > ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY > collectionspace_core:updatedAt DESC > > DEBUG [http-8180-2] > [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] > Caught exception > > org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: > operator does not exist: character varying >= double precision > > Hint: No operator matches the given name and argument type(s). You might > need to add explicit type casts. > > Position: 386 > > > > > > >
AR
Aron Roberts
Fri, Apr 26, 2013 5:09 PM

Hi Jesse,

That sounds likely to be caused by the same bug ... there's a
proposed fix for this in a single commit that you can apply via 'git
cherry-pick', if you'd like to try this out:

https://github.com/aronr/services/commit/9e6e426eddbb6e699620b4c44fe7c96ec87d8314

Aron

On Fri, Apr 26, 2013 at 9:59 AM, Jesse Martinez mjesse@gmail.com wrote:

Just a quick followup...

Can the objectNameProperty tag value in tenant-bindings only be of a string
type? I get an error in the search results when I use a decimal type field.
This is likely related to my earlier message on the list and documented in
CSPACE-5763.

2013-04-26 12:47:17,911 DEBUG [http-8180-4]
[org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151]
Caught exception
java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.String
at
org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144)
at
org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252)

On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

That was easy – glad to help ;-)

From: Jesse Martinez [mailto:mjesse@gmail.com]
Sent: Thursday, April 25, 2013 2:46 PM
To: Patrick Schmitz
Cc: CollectionSpace Talk List
Subject: Re: [Talk] possible to search by a range of floats?

This works, thanks, Patrick.

(The field was originally defined as a string -- I made a mistake in my
previous email)

On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez mjesse@gmail.com wrote:

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the
following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
Jesse Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search
by a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

Hi Jesse, That sounds likely to be caused by the same bug ... there's a proposed fix for this in a single commit that you can apply via 'git cherry-pick', if you'd like to try this out: https://github.com/aronr/services/commit/9e6e426eddbb6e699620b4c44fe7c96ec87d8314 Aron On Fri, Apr 26, 2013 at 9:59 AM, Jesse Martinez <mjesse@gmail.com> wrote: > Just a quick followup... > > Can the objectNameProperty tag value in tenant-bindings only be of a string > type? I get an error in the search results when I use a decimal type field. > This is likely related to my earlier message on the list and documented in > CSPACE-5763. > > > 2013-04-26 12:47:17,911 DEBUG [http-8180-4] > [org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151] > Caught exception > java.lang.ClassCastException: java.lang.Double cannot be cast to > java.lang.String > at > org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182) > at > org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245) > at > org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144) > at > org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252) > > > > > > On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz <pschmitz@berkeley.edu> > wrote: >> >> That was easy – glad to help ;-) >> >> >> >> From: Jesse Martinez [mailto:mjesse@gmail.com] >> Sent: Thursday, April 25, 2013 2:46 PM >> To: Patrick Schmitz >> Cc: CollectionSpace Talk List >> Subject: Re: [Talk] possible to search by a range of floats? >> >> >> >> This works, thanks, Patrick. >> >> >> >> (The field was originally defined as a string -- I made a mistake in my >> previous email) >> >> >> >> On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez <mjesse@gmail.com> wrote: >> >> Ooh, I should have mentioned this earlier. I have the field defined as a >> float... I'll change it to a decimal type and try that next. I'll update >> with my results. >> >> >> >> - Jesse >> >> >> >> On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu> >> wrote: >> >> Is valuationcontrols_common:valueAmount defined as a double/float >> (xs:decimal), or as text (xs:string)? If it follows the pattern we have for >> purchase price, etc., then it is xs:decimal, and should work. If it is text >> (xs:string) then I think that is why the postgres interpreter is confused. >> >> >> >> If it is defined in the xsd as a decimal, then we need to look at the NXQL >> we are generating. >> >> >> >> Another option is to add an implicit cast to postgres, as per the >> following: >> >> >> http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts >> >> http://www.postgresql.org/docs/9.2/static/sql-createcast.html >> >> >> >> However, I think this is not what you want. >> >> >> >> Patrick >> >> >> >> >> >> From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of >> Jesse Martinez >> Sent: Thursday, April 25, 2013 12:43 PM >> To: CollectionSpace Talk List >> Subject: [Talk] possible to search by a range of floats? >> >> >> >> Hi all, >> >> >> >> I set up a field constrained to float values and configured it to search >> by a range in advanced search. This breaks when I search by any value other >> than whole values (integers). Is this a known limitation on using ranged >> search? >> >> >> >> Here's the error message: >> >> >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] >> The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( >> (valuationcontrols_common:valueAmount >= 100.00) ) >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] >> Executing NXQL query: SELECT * FROM Valuationcontrol WHERE >> collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> >> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND >> ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY >> collectionspace_core:updatedAt DESC >> >> DEBUG [http-8180-2] >> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] >> Caught exception >> >> org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: >> operator does not exist: character varying >= double precision >> >> Hint: No operator matches the given name and argument type(s). You might >> need to add explicit type casts. >> >> Position: 386 >> >> >> >> >> >> > > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
AR
Aron Roberts
Fri, Apr 26, 2013 8:10 PM

Just a note to all ... please hold off on using the specific commit
below, made to my own repo: it's likely going to be replaced by or
consolidated with another commit.  (And after the dust settles, it
should also be able to handle Double values returned from the Nuxeo
repository, resulting from xs:decimal declarations in XSD schema
files, as well as GregorianCalendar values returned from xs:date or
xs:dateTime declarations.)

On Fri, Apr 26, 2013 at 10:09 AM, Aron Roberts
aron@socrates.berkeley.edu wrote:

Hi Jesse,

That sounds likely to be caused by the same bug ... there's a
proposed fix for this in a single commit that you can apply via 'git
cherry-pick', if you'd like to try this out:

https://github.com/aronr/services/commit/9e6e426eddbb6e699620b4c44fe7c96ec87d8314

Aron

On Fri, Apr 26, 2013 at 9:59 AM, Jesse Martinez mjesse@gmail.com wrote:

Just a quick followup...

Can the objectNameProperty tag value in tenant-bindings only be of a string
type? I get an error in the search results when I use a decimal type field.
This is likely related to my earlier message on the list and documented in
CSPACE-5763.

2013-04-26 12:47:17,911 DEBUG [http-8180-4]
[org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151]
Caught exception
java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.String
at
org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245)
at
org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144)
at
org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252)

On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

That was easy – glad to help ;-)

From: Jesse Martinez [mailto:mjesse@gmail.com]
Sent: Thursday, April 25, 2013 2:46 PM
To: Patrick Schmitz
Cc: CollectionSpace Talk List
Subject: Re: [Talk] possible to search by a range of floats?

This works, thanks, Patrick.

(The field was originally defined as a string -- I made a mistake in my
previous email)

On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez mjesse@gmail.com wrote:

Ooh, I should have mentioned this earlier. I have the field defined as a
float... I'll change it to a decimal type and try that next. I'll update
with my results.

  • Jesse

On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz pschmitz@berkeley.edu
wrote:

Is valuationcontrols_common:valueAmount defined as a double/float
(xs:decimal), or as text (xs:string)? If it follows the pattern we have for
purchase price, etc., then it is xs:decimal, and should work. If it is text
(xs:string) then I think that is why the postgres interpreter is confused.

If it is defined in the xsd as a decimal, then we need to look at the NXQL
we are generating.

Another option is to add an implicit cast to postgres, as per the
following:

http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts

http://www.postgresql.org/docs/9.2/static/sql-createcast.html

However, I think this is not what you want.

Patrick

From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
Jesse Martinez
Sent: Thursday, April 25, 2013 12:43 PM
To: CollectionSpace Talk List
Subject: [Talk] possible to search by a range of floats?

Hi all,

I set up a field constrained to float values and configured it to search
by a range in advanced search. This breaks when I search by any value other
than whole values (integers). Is this a known limitation on using ranged
search?

Here's the error message:

DEBUG [http-8180-2]
[org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391]
The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND (
(valuationcontrols_common:valueAmount >= 100.00) )

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861]
Executing NXQL query: SELECT * FROM Valuationcontrol WHERE
collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <>
'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND
ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY
collectionspace_core:updatedAt DESC

DEBUG [http-8180-2]
[org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888]
Caught exception

org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR:
operator does not exist: character varying >= double precision

Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

Position: 386

Just a note to all ... please hold off on using the specific commit below, made to my own repo: it's likely going to be replaced by or consolidated with another commit. (And after the dust settles, it should also be able to handle Double values returned from the Nuxeo repository, resulting from xs:decimal declarations in XSD schema files, as well as GregorianCalendar values returned from xs:date or xs:dateTime declarations.) On Fri, Apr 26, 2013 at 10:09 AM, Aron Roberts <aron@socrates.berkeley.edu> wrote: > Hi Jesse, > > That sounds likely to be caused by the same bug ... there's a > proposed fix for this in a single commit that you can apply via 'git > cherry-pick', if you'd like to try this out: > > https://github.com/aronr/services/commit/9e6e426eddbb6e699620b4c44fe7c96ec87d8314 > > Aron > > On Fri, Apr 26, 2013 at 9:59 AM, Jesse Martinez <mjesse@gmail.com> wrote: >> Just a quick followup... >> >> Can the objectNameProperty tag value in tenant-bindings only be of a string >> type? I get an error in the search results when I use a decimal type field. >> This is likely related to my earlier message on the list and documented in >> CSPACE-5763. >> >> >> 2013-04-26 12:47:17,911 DEBUG [http-8180-4] >> [org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler:151] >> Caught exception >> java.lang.ClassCastException: java.lang.Double cannot be cast to >> java.lang.String >> at >> org.collectionspace.services.common.context.ServiceBindingUtils.getMappedFieldInDoc(ServiceBindingUtils.java:182) >> at >> org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.processDocList(ServiceGroupDocumentModelHandler.java:245) >> at >> org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler.getItemsForGroup(ServiceGroupDocumentModelHandler.java:144) >> at >> org.collectionspace.services.servicegroup.ServiceGroupResource.getItems(ServiceGroupResource.java:252) >> >> >> >> >> >> On Thu, Apr 25, 2013 at 5:51 PM, Patrick Schmitz <pschmitz@berkeley.edu> >> wrote: >>> >>> That was easy – glad to help ;-) >>> >>> >>> >>> From: Jesse Martinez [mailto:mjesse@gmail.com] >>> Sent: Thursday, April 25, 2013 2:46 PM >>> To: Patrick Schmitz >>> Cc: CollectionSpace Talk List >>> Subject: Re: [Talk] possible to search by a range of floats? >>> >>> >>> >>> This works, thanks, Patrick. >>> >>> >>> >>> (The field was originally defined as a string -- I made a mistake in my >>> previous email) >>> >>> >>> >>> On Thu, Apr 25, 2013 at 5:28 PM, Jesse Martinez <mjesse@gmail.com> wrote: >>> >>> Ooh, I should have mentioned this earlier. I have the field defined as a >>> float... I'll change it to a decimal type and try that next. I'll update >>> with my results. >>> >>> >>> >>> - Jesse >>> >>> >>> >>> On Thu, Apr 25, 2013 at 5:21 PM, Patrick Schmitz <pschmitz@berkeley.edu> >>> wrote: >>> >>> Is valuationcontrols_common:valueAmount defined as a double/float >>> (xs:decimal), or as text (xs:string)? If it follows the pattern we have for >>> purchase price, etc., then it is xs:decimal, and should work. If it is text >>> (xs:string) then I think that is why the postgres interpreter is confused. >>> >>> >>> >>> If it is defined in the xsd as a decimal, then we need to look at the NXQL >>> we are generating. >>> >>> >>> >>> Another option is to add an implicit cast to postgres, as per the >>> following: >>> >>> >>> http://doc.nuxeo.com/display/ADMINDOC/Configuring+PostgreSQL#ConfiguringPostgreSQL-Implicitcasts >>> >>> http://www.postgresql.org/docs/9.2/static/sql-createcast.html >>> >>> >>> >>> However, I think this is not what you want. >>> >>> >>> >>> Patrick >>> >>> >>> >>> >>> >>> From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of >>> Jesse Martinez >>> Sent: Thursday, April 25, 2013 12:43 PM >>> To: CollectionSpace Talk List >>> Subject: [Talk] possible to search by a range of floats? >>> >>> >>> >>> Hi all, >>> >>> >>> >>> I set up a field constrained to float values and configured it to search >>> by a range in advanced search. This breaks when I search by any value other >>> than whole values (integers). Is this a known limitation on using ranged >>> search? >>> >>> >>> >>> Here's the error message: >>> >>> >>> >>> DEBUG [http-8180-2] >>> [org.collectionspace.services.valuationcontrol.ValuationcontrolResource:391] >>> The WHERE clause is: ecm:currentLifeCycleState <> 'deleted' AND ( >>> (valuationcontrols_common:valueAmount >= 100.00) ) >>> >>> DEBUG [http-8180-2] >>> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:861] >>> Executing NXQL query: SELECT * FROM Valuationcontrol WHERE >>> collectionspace_core:tenantId = 1 AND (ecm:currentLifeCycleState <> >>> 'deleted' AND ( (valuationcontrols_common:valueAmount >= 100.00) )) AND >>> ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 ORDER BY >>> collectionspace_core:updatedAt DESC >>> >>> DEBUG [http-8180-2] >>> [org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl:888] >>> Caught exception >>> >>> org.nuxeo.ecm.core.api.ClientException: Failed to execute query: ERROR: >>> operator does not exist: character varying >= double precision >>> >>> Hint: No operator matches the given name and argument type(s). You might >>> need to add explicit type casts. >>> >>> Position: 386 >>> >>> >>> >>> >>> >>> >> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>