[MarkLogic Dev General] Search API numeric field

Pradeep Maddireddy pradeep400 at gmail.com
Wed Apr 28 02:59:38 PDT 2010


Hi..!

  In my XML file I have a numeric field "price". When I create a value
constraint for this field as

<constraint name="Price">
<value>
<element ns="http://marklogic.com/ls" name="price"/>
</value>
 </constraint>

and pass it in the options field to Search API and search term as  price:120,
search API doesn't return any result  but when I create a range
constraint  for the same field as
<constraint name="price">
<range type="xs:decimal" facet="false">
<element ns="http://marklogic.com/ls" name="price"/>
 </range>
</constraint>

and pass the same search term search API returns few results. Is it
mandatory to have a range constraint for a numeric field instead of
value constraint.

Thanks
Pradeep Maddireddy


More information about the General mailing list