We have two XML documents with the following elements:
<!-- Document 1 -->
<LegacyCode>09Y14K012D3001</LegacyCode>
<!-- Document 2 -->
<LegacyCode>09 14 012 3001</LegacyCode>
I’m using the following cts:search
query to fetch these documents:
cts:search(
doc(),
cts:and-query((
cts:collection-query("XYZ"),
cts:word-query("*09*14*012*3001*", ("punctuation-insensitive", "whitespace-insensitive", "wildcarded"))
))
)
However, this query does not return the expected documents. Interestingly, if I use the "whitespace-sensitive"
option, it successfully retrieves the documents.
Index Settings:
The following index settings are enabled:
-
word searches
-
fast phrase searches
-
fast case-sensitive searches
-
fast diacritic-sensitive searches
-
trailing wildcard searches
-
trailing wildcard word positions
-
three-character searches
-
three-character word positions
-
two-character searches
-
one-character searches
What is causing this search behavior? Given that “whitespaces” do not seem to be playing any part here, why is the "whitespace-insensitive"
option failing to fetch the documents while "whitespace-sensitive"
succeeds?