Is the goal to set up a field that indexes attribute words? As far as I know 
that isn't possible. Fields only seem to pick up word-query terms, whatever the 
include-exclude settings. This makes more sense if you recall that attribute 
words match cts:element-attribute-word-query(), but attribute words don't match 
cts:word-query().

cts:contains(
  <p>hello world</p>,
  cts:word-query('hello')),
cts:contains(
  <p value="hello world"/>,
  cts:word-query('hello')),
cts:contains(
  <p value="hello world"/>,
  cts:element-attribute-word-query(
    xs:QName('p'), xs:QName('value'), 'hello'))
=>
true
false
true

It would be nice to have the option to index attribute words in word-query and 
fields, but for now I think you'd have to transform or duplicate the attribute 
words as element words.

-- Mike

On 24 Oct 2012, at 07:18 , Shannon Scott Shiflett <shifl...@virginia.edu> wrote:

> Hi,
> 
> Is it possible to include an attribute in a field index without specifying a 
> value? Would you recommend preprocessing? 
> 
> Thanks.
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to