[MarkLogic Dev General] wildcarded search not working for value based search
Mary Holstege
mary.holstege at marklogic.com
Thu Jun 21 07:20:14 PDT 2012
On Thu, 21 Jun 2012 00:01:41 -0700, amit gope <amitgope2 at gmail.com> wrote:
> Hi All,
>
> Well i am able to search both word as well as value based constraint or search, but wildcard search is not getting reflected in case of range value. Please suggest any work around. I am stuck in no man's land.
>
> On 20 June 2012 20:22, amit gope <amitgope2 at gmail.com<mailto:amitgope2 at gmail.com>> wrote:
> Hi All,
>
> I am working with the search api and want to implement wild card search. Well it gives me results for parameters that has phrase based parameters but not for value based searches. Please suggest the workaround.
>
> Parameters fetching result:: <q>author:"ami?"</q>
> Parameters not fetching result :: <q>date:201?</q>
I'm assuming the date constraint is a number? Or at any rate
something that is not a string, yes? In that case you need
to be performing some kind of operation appropriate to that
type: equality, less than, etc. Wildcards are string operations
and they won't work against a non-string, I'm afraid.
So what you are really saying here is that you want a number
between 2010 and 2019 inclusive. You need to express your query
in those terms. Alternatively, set up the date range index
as a string.
//Mary
More information about the General
mailing list