*if i try this :*

var c_filter = new OpenLayers.Filter.Logical({ 
type: OpenLayers.Filter.Logical.OR, 
filters: [ 
new OpenLayers.Filter.Comparison({ 
    type: OpenLayers.Filter.Comparison.EQUAL_TO, 
    matchCase:false, 
    property: 'id', 
    value:(document.getElementById("Text")).value     
    }),   
new OpenLayers.Filter.Comparison({ 
    type: OpenLayers.Filter.Comparison.LIKE, 
    matchCase:false, 
    property: 'name', 
    value: "*" +(document.getElementById("Text")).value + "*"   
    })   
    ] 
}); 

wfsProtocol.read({             
    filter: c_filter,           
    callback: processTheQuery, 
    scope: strategy 
         }) 


*the first filter works fine. but the second doesn't, when i searched for
name: Peter Lyam, i got this error :*
<ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>java.lang.RuntimeException: java.io.IOException 
java.io.IOException 
null 

*ERROR: invalid input syntax for integer: "Peter Lyam"*

  Position: 380</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>


*the request :*
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"; service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><wfs:Query
typeName="feature:Main_Layer" srsName="EPSG:3857"
xmlns:feature="http://mapmap.org";><ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc";><ogc:Or><ogc:PropertyIsEqualTo
matchCase="false"><ogc:PropertyName>id</ogc:PropertyName><ogc:Literal>Peter
Lyam</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsLike
matchCase="false" wildCard="*" singleChar="."
escapeChar="!"><ogc:PropertyName>name</ogc:PropertyName><ogc:Literal>*Peter
Lyam*</ogc:Literal></ogc:PropertyIsLike></ogc:Or></ogc:Filter></wfs:Query></wfs:GetFeature>


it seems like it cannot see the *OR* and did all two filters with the same
value! and because of the first filter expects integer (id) , that cause
this error. 
is there any way to fix that ?

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/ogc-Or-not-working-tp4901377p4901377.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to