Check with support, but I think this may be a bug. On my 6.0-2.3 instance, it seems like only one exclude works for a given element QName, no matter how many are configured.
It might also be undocumented behavior: http://docs.marklogic.com/guide/admin/fields#id_55786 notes that "You can only specify an attribute value for an included element; you cannot specify one for an excluded element." But it seems to be working for @type=text, and it seems odd to have an attribute in the form at database-field-add-excludes.xqy if it isn't supported. Another way to approach this might be to exclude 'test-value' entirely and then include 'test-value[@type eq "num"]'. But that didn't work for me with 6.0-2.3, and I'm not really sure if it ought to. -- Mike On 2 Apr 2013, at 11:49 , Paul M <[email protected]> wrote: > <field> > <field-name>testme</field-name> > <include-root>false</include-root> > <field-value-searches>true</field-value-searches> > <included-elements> > <included-element> > <localname>test-group</localname> > <attribute-localname>val</attribute-localname> > <attribute-value>true</attribute-value> > </included-element> > </included-elements> > <excluded-elements> > <excluded-element> > <localname>test-value</localname> > <attribute-localname>type</attribute-localname> > <attribute-value>wt</attribute-value> > </excluded-element> > <excluded-element> > <localname>test-value</localname> > <attribute-localname>type</attribute-localname> > <attribute-value>text</attribute-value> > </excluded-element> > </excluded-elements> > </field> > > <range-field-index> > <scalar-type>string</scalar-type> > <field-name>testme</field-name> > <collation>http://marklogic.com/collation/</collation> > <range-value-positions>false</range-value-positions> > <invalid-values>reject</invalid-values> > </range-field-index> > > <test> > <test-group val="true"> > <test-value type="text">ttt</test-value> > <test-value type="num">111</test-value> > <test-value type="wt">1.0</test-value> > </test-group> > </test> > > > cts:field-values("testme", "") > 111 1.0 > > i would like both @text and @wt pcdata excluded and only @num value > returned, i.e. 111 > including @num then results in all test-values being returned??? > > Any ideas? > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
