Here's a useful tool for understanding word tokenization in MarkLogic: 
https://docs.marklogic.com/cts:tokenize

"1245/D123"
! cts:tokenize(.)
! xdmp:describe(.)
=>
cts:word("1245")
cts:punctuation("/")
cts:word("D123")

This makes it easier to see "1245/D123" that tokenizes as two words, one of 
which matches "D*".

Maybe you could use https://docs.marklogic.com/cts:element-value-query instead 
of element-word-query?

-- Mike

On 12 Jun 2014, at 05:44 , Amit Kumar Dev <[email protected]> wrote:

> Hi,
>  
> I am using one character search with term “D*” in “class-number” node of the 
> xml.
> I am getting docs which has class-number starts with “D”
> In response I am also getting few documents which contains “D” after “/” 
> (slash) or “.” (dot)  for class-number element.
>  
> Response for search Term “D*” in class-number element:
> <class-number>D245/123<class-number>------------Expected
> <class-number>A245/123 D5<class-number>--------Expected since space separates 
> the terms
> <class-number>1245/D123<class-number>-----------Not Expected
> <class-number>1245.D123<class-number>-----------Not Expected
>  
> I tried with below queries:
> ·         Element query with combination of word query.
> ·         Element word query.
> ·         Field word query by creating field for class-number element.
>  
> I am using ML 6 and one character search index is enabled.
>  
> I am using following options in query “unstemmed”, 
> “wildcarded”,”case-insensitive”, “punctuation-sensitive”.
>  
> Please suggest is it default behavior of Mark logic search or I need to 
> change some setting for this.
>  
> Thanks and regards
> Amit Dev
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are 
> not
> to copy, disclose, or distribute this e-mail or its contents to any other 
> person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has 
> taken
> every reasonable precaution to minimize this risk, but is not liable for any 
> damage
> you may sustain as a result of any virus in this e-mail. You should carry out 
> your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this 
> e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

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

Reply via email to