Hi Amit,

When you run search:search() or search:parse(), the second argument you can 
pass in is a set of options.  Are you using any options?  If so, what do they 
look like?  And what version of MarkLogic are you using?

--Colleen

________________________________
From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of amit gope 
[amitgo...@gmail.com]
Sent: Sunday, June 16, 2013 9:43 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] Field Range Index creation providing different 
result

Hello All,

I have a database where we have an element named as "Keyword".This element has 
abides to the collation setting "http://marklogic.com/collation/";. I want the 
collation as case and punctuation insensitive, but I cannot directly change my 
elements collation setting. Thus I created a Field "keywordcl" and a Field 
Range Index over it with the collation as 
"http://marklogic.com/collation//S1/AS/T00BB"; . But ever since adding this 
collation, whatever query regarding keyword i am using, I am only getting 
single result.I am passing the query as "keyword:"amit" OR keywordcl:"amit". 
The search parse result of my query looks as :

<cts:or-query qtextjoin="OR" strength="10" qtextgroup="( )" 
xmlns:cts="http://marklogic.com/cts";>
  <cts:element-range-query qtextpre="keyword:" qtextref="cts:annotation" 
operator="=">
    <cts:element>Keyword</cts:element>
    <cts:annotation qtextpre="&quot;" qtextref="following-sibling::cts:value" 
qtextpost="&quot;"/>
    <cts:value xsi:type="xs:string" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>amit</cts:value>
    <cts:option>collation=http://marklogic.com/collation/</cts:option>
  </cts:element-range-query>
  <cts:field-range-query qtextpre="keywordcl:" qtextref="cts:annotation" 
operator="=">
    <cts:annotation qtextpre="&quot;" qtextref="following-sibling::cts:value" 
qtextpost="&quot;"/>
    <cts:field>keywordcl</cts:field>
    <cts:value xsi:type="xs:string" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>amit</cts:value>
    
<cts:option>collation=http://marklogic.com/collation//S1/AS/T00BB</cts:option>
  </cts:field-range-query>
</cts:or-query>

I want my query as :
cts:search(/Publisher//KeywordGroup/Keyword,
cts:word-query("amit", 
("case-insensitive","stemmed","punctuation-insensitive")))

Please suggest if I have done something wrong, and possible way to achieve 
this. I am using search:search to find results.

--
Regards
Amit

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

Reply via email to