私はこのような文書コンテンツをいくつか持っており、要素 "キー"に範囲インデックスがあります。ファセットを生成するとき範囲制約で計算されたバケットにユーザー定義のアンカーを使用できますか?
<root>
<key>NAM</key>
<key>NA</key>
<key>North America</key>
</root>
、私は1つのグループにそれらの代わりに、それぞれ一つに「NAM」と「NA」を計算します。
<constraint name="date">
<range type="xs:dateTime" facet="true">
<element ns="http://example.com" name="entry"/>
<attribute ns="" name="date"/>
<computed-bucket lt="-P1Y" anchor="start-of-year" name="older">Older</computed-bucket>
<computed-bucket lt="P1Y" ge="P0Y" anchor="start-of-year" name="year">This Year</computed-bucket>
<computed-bucket lt="P1M" ge="P0M" anchor="start-of-month" name="month">This Month</computed-bucket>
<computed-bucket lt="P1D" ge="P0D" anchor="start-of-day" name="today">Today</computed-bucket>
<computed-bucket ge="P0D" anchor="now" name="future">Future</computed-bucket>
<facet-option>descending</facet-option>
</range>
</constraint>
しかし、私は、アンカーは、一般的にMarkLogicによって事前に定義されていることに気づいたので、私は求めています:
は、だから私は、多かれ少なかれ、この例のように、計算されたバケットを使用しようとした私が使用することができます私自身が定義したアンカーのような機能は以下の通りですか?
<computed-bucket ge="P0D" anchor="myAnchor.xqy" name="future">Future</computed-bucket>
あなたは何をしたいのですか?あなたのXMLスニペットには日付が含まれていないので、myAnchor.xqyは何をしますか? – grtjn
myAnchor.xqyは、「アジア」と「NAM」を1つのファセットグループに入れるなど、自分のグループ化戦略を定義することです。 –