search map based on key wildcard
Posted
by
Hugo Koopmans
on Stack Overflow
See other posts from Stack Overflow
or by Hugo Koopmans
Published on 2014-08-21T10:15:07Z
Indexed on
2014/08/21
22:20 UTC
Read the original article
Hit count: 292
marklogic
I have the following map of maps:
<map:map xmlns:map="http://marklogic.com/xdmp/map" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<map:entry key="101201">
<map:value>
"content"
</map:value>
</map:entry>
... more maps ...
Now I would like to search/filter the map based on the key using a wildcard.
Actually I want to filter based on the first 4 characters of the key="101201" so key="1012**".
Question: Give me all maps that have a key that is matching '1012*' ...
Can that be done efficiently?
tx for your time
hugo
© Stack Overflow or respective owner