Hi
 
 My xmls will be in the format given below:
Xml
<item>
<id>10202</id>
<Name>Herbal cream</Name>
<group>
<id>i1</id>
<description> cream product</description>
</group>
<method>
            <id>md128</id>
            <description>herbal</description>
</method>
<groupdesc>cream product</groupdesc> (:Indexed based on this group element:)
<item>
 
Query
 
<facet name=”group”> {
for $x in cts:element-values(xs:QName("group"),"",$options , 
  cts:word-query("herbal")[1 to 10])
order by cts:frequency($x) descending
return 
(
 <int name={$x}>{cts:frequency($x)}</int> 
)
} </facet>
 
 
I have created index for the “groupdesc” field and getting the facet result 
with 
frequency as given below:
 
 
Current Output:
<facet name=”group”>
<int name=”cream product” > 1</int>
<int name=”oil product” > 3</int>
…
</facet>
 
But the result should be in the format given below. That is facet name is a 
combination of the <group> elements <id> and <description> values
 
Expected output:
<facet name=”group”>
<int name=” i1 cream product” > 1</int>
<int name=” i2 oil product” > 3</int>
...

</facet>
 
 Can anyone help me in attaining the expected output?

Thanks in advance

Regards,
Mano


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to