Hi,

I'm working on an application that uses the Search API and I am trying to set 
the collation on an element range index to be diacritic insensitive. However, 
the same results are returned in the same order regardless of the collation 
that I use. We are using Marklogic 7. Has anyone encountered a similar problem 
before? If so, any thoughts on how to solve it?

Thanks,
Maggie

Here is the simplified version of the search:

declare variable $options :=
  <options xmlns="http://marklogic.com/appservices/search";>
      <constraint name="title">
      <word>
        <element ns="http://digital.library.ptsem.edu/ia"; name="title"/>
      </word>
    </constraint>
    <transform-results apply="empty-snippet"/>
    <operator name="sort">
     <state name="title">
       <sort-order xmlns="http://marklogic.com/appservices/search"; 
type="xs:string">
        <element ns="http://digital.library.ptsem.edu/ia"; name="sortTitle" 
collation="http://marklogic.com/collation/en/S1/AS/T0020"; />
       </sort-order>
     </state>
    </operator>
  </options>;
let $response:= search:search("title:Viage literario", $options, 1, 500)
let $total := $response/@total
for $result in $response/search:result
let $uri := $result/@uri
let $doc := fn:doc($uri)
let $title := $doc/ia:doc/ia:metadata/ia:sortTitle
let $vol := $doc/ia:doc/ia:metadata/ia:volumeInfo/ia:volume
Return fn:string($title)

Here are the results that I am seeing:

Viage literario á iglesias de España
Viage literario á iglesias de España
Viage literario á iglesias de España
Viage literario á iglesias de España
Viage literario a las iglesias de Espana
Viage literario á iglesias de España
Viage literario a las iglesias de Espana
Viage literario á iglesias de España
Viage literario á iglesias de España : Le Publica con algunas observaciones
Viage literario á iglesias de España
Viage literario a las iglesias de Espana
Viage literario á iglesias de España
Viage literario a las iglesias de Espana
Viage literario a las iglesias de Espana
Viage literario a las iglesias de Espana
Viage literario a las iglesias de Espana
Viage literario a las iglesias de Espana

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

Reply via email to