On Thu, 12 Jun 2014 05:44:37 -0700, 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

Actually, these are expected as well. Punctuation is a token
break.

>
> 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.

All these are word queries, and after punctuation you
are starting a new word.

I see two options for you:
(1) Recast your data so that you can use exact value queries.
That is, your second case above would not be a match on a value
query, so if that is a problem, you'd need to use multiple
class-number elements or something.
(2) (ML7) Use customized tokenization on a field over class-number
to make the punctuation you expect to be part of the token into
word characters so that you don't get the token break.

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

Reply via email to