rake | 18 Aug 18:59
Picon

How do you enable the wildcard option?


In the documentation (http://xappy.org/docs/0.5/introduction.html) it
states that the wildcard option is currently disabled by default.
Does anyone know how to enable it?

Thanks
Richard Boulton | 19 Aug 13:09
Gravatar

Re: How do you enable the wildcard option?

2009/8/18 rake <ajoshmayer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


In the documentation (http://xappy.org/docs/0.5/introduction.html) it
states that the wildcard option is currently disabled by default.
Does anyone know how to enable it?

There was no support for this until just now, but I've just applied a patch to trunk which may add support for it.  I've tested that this doesn't break anything, but not tested yet that it actually works!

With this patch, you should be able to supply a "allow_wildcards=True" parameter to query_parse(), to turn on wildcard support.

--
Richard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "xappy-discuss" group.
To post to this group, send email to xappy-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to xappy-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.com/group/xappy-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment (patch): application/octet-stream, 6287 bytes
rake | 19 Aug 22:23
Picon

Re: How do you enable the wildcard option?


Thanks, I'll test it out and let you know how it goes.

Josh

On Aug 19, 7:09 am, Richard Boulton <rich...@...> wrote:
> 2009/8/18 rake <ajoshma...@...>
>
>
>
> > In the documentation (http://xappy.org/docs/0.5/introduction.html) it
> > states that the wildcard option is currently disabled by default.
> > Does anyone know how to enable it?
>
> There was no support for this until just now, but I've just applied a patch
> to trunk which may add support for it.  I've tested that this doesn't break
> anything, but not tested yet that it actually works!
>
> With this patch, you should be able to supply a "allow_wildcards=True"
> parameter to query_parse(), to turn on wildcard support.
>
> --
> Richard
>
>  patch
> 8KViewDownload
Franz Zieher | 22 Aug 18:43
Picon

query_parse behavior


I'm trying to use the supplied example code to index a view documents
and test the search behavior.

My index setup for the database is

    iconn.add_field_action('name',xappy.FieldActions.INDEX_FREETEXT,
language='en')
    iconn.add_field_action('name',xappy.FieldActions.STORE_CONTENT)

    iconn.add_field_action
('description',xappy.FieldActions.INDEX_FREETEXT, language='en')
    iconn.add_field_action
('description',xappy.FieldActions.STORE_CONTENT)

    iconn.add_field_action
('content',xappy.FieldActions.INDEX_FREETEXT, language='en')
    iconn.add_field_action('content',xappy.FieldActions.STORE_CONTENT)

    iconn.add_field_action('author', xappy.FieldActions.INDEX_EXACT)
    iconn.add_field_action('author', xappy.FieldActions.STORE_CONTENT)
    iconn.add_field_action('author', xappy.FieldActions.SORTABLE)

    iconn.add_field_action('date', xappy.FieldActions.INDEX_EXACT)
    iconn.add_field_action('date', xappy.FieldActions.STORE_CONTENT)
    iconn.add_field_action('date',
xappy.FieldActions.SORTABLE,type="float")

    iconn.add_field_action('path', xappy.FieldActions.INDEX_EXACT)
    iconn.add_field_action('path', xappy.FieldActions.STORE_CONTENT)

    iconn.add_field_action('spath', xappy.FieldActions.INDEX_EXACT)
    iconn.add_field_action('spath', xappy.FieldActions.STORE_CONTENT)
    iconn.add_field_action('spath', xappy.FieldActions.SORTABLE)

    iconn.add_field_action('project', xappy.FieldActions.INDEX_EXACT)
    iconn.add_field_action('project',
xappy.FieldActions.STORE_CONTENT)
    iconn.add_field_action('project', xappy.FieldActions.SORTABLE)

Searching in the database using

q = conn.query_parse(queryString)
res = conn.search(q,0,10)

does not return any results for queryString = 'author:zieherf'
although a number of documents have zieherf
as author assigned. Using conn.query_field does return the documents.
Is that behavior intended?
From the documentation on conn.query_parse I take it that the above
search should work. I tried this for
other fields with have INDEX_EXACT and found the same behavior.

...
    The string passed to this method can have various operators in
it.  In
    particular, it may contain field specifiers (ie, field names,
followed
    by a colon, followed by some text to search for in that field).
For
    example, if "author" is a field in the database, the search string
    could contain "author:richard", and this would be interpreted as
    "search for richard in the author field".  By default, any fields
in
    the database which are indexed with INDEX_EXACT or INDEX_FREETEXT
will
    be available for field specific searching in this way - however,
this
    can be modified using the "allow" or "deny" parameters, and also
by the
    allow_field_specific tag on INDEX_FREETEXT fields.
...

Any ideas what I'm doing wrong?

Franz

Gmane