I want to search for a word in document say 456. I used cts:element-query here. But i am getting results which like 123456, 456.23, 23.456
How to search for documents that has 456 alone.
"456.23" is tokenized as three separate tokens: "456", ".", and "23". Since the token "456" is in the document, a word query for "456" will match. Similarly for "23.456". I would not expect "123456" to match: are you sure it does? Or perhaps "456" appears elsewhere in the same document.
If you want to do value based queries, you probably want to set up a numeric range index on the element and use cts:element-range-query instead.