[Xapian-devel] GSoC xapian node binding

Marius Tibeica mtibeica at gmail.com
Thu May 3 10:16:56 BST 2012


Updated Enquire to have a single set method:

    set_parameters_sync( object_parameters)
        Set the parameters to be used for queries.
        The object parameter can have one or more of the following:
          {
            collapse_key: { key: uint32, max: uint32=1},
            docid_order: uint32,
            cutoff: { percent: int32, weight: number=0 },
            sort: [ sort_by_info_1, ... ]
          }
        The sort_by_info object can be:
            RELEVANCE - sorting by relevance
            { key: string, reverse: bool } - sorting by value (with reverse)
            string_value_key - sorting by value
        The valid sort arrays currently are:
            [ RELEVANCE ] - sort_by_relevance
            [ { key: string_value_key, reverse: bool } ] - sort_by_value
            [ string_value_key ] - sort_by_value
            [ { key: string_value_key, reverse: bool }, RELEVANCE ] -
sort_by_value_then_relevance
            [ string_value_key, RELEVANCE ] - sort_by_value_then_relevance
            [ RELEVANCE, { key: string_value_key, reverse: bool } ] -
sort_by_relevance_then_value
            [ RELEVANCE, string_value_key ] - sort_by_relevance_then_value


On Wed, May 2, 2012 at 11:14 PM, Liam <xapian at networkimprov.net> wrote:

> List Admin: this list really needs a reply-to header, to prevent
> accidental off-list replies!
>
> On Wed, May 2, 2012 at 12:32 PM, Marius Tibeica <mtibeica at gmail.com>wrote:
>
>> On Wed, May 2, 2012 at 9:36 PM, Liam <xapian at networkimprov.net> wrote:
>>
>>>
>>>
>>> On Wed, May 2, 2012 at 6:32 AM, Marius Tibeica <mtibeica at gmail.com>wrote:
>>>
>>>> Finished the design of the sync methods:
>>>> https://github.com/mtibeica/node-xapian/blob/master/docs.md
>>>> I will probably continue with the creation of a test framework and
>>>> porting the tests from the Perl binding.
>>>>
>>>
>>> Can you look for other places where we can combine multiple methods into
>>> a single one with an object argument, as with Query::Query? For instance
>>> Enquire::set_sort_*
>>>
>>
>> Is is possible to set multiple sort types with Enquire? The method names
>> seem to suggest otherwise to me.
>> We could do a set_sort with an array of objects like {  by:
>> 'relevance' }, { by: 'value', sort_key: uint32, reverse: 'bool'}, and if
>> a succession of these objects is not supported (more than 2 elements, etc),
>> to throw a not yet supported exception.
>>
>
> I think an Enquire parameters object could include collapse-key,
> docid-order, cutoff, value, and a relevance field which can be:
>   0 or undefined - value ? set_sort_by_value : noop
>   1 - value ? set_sort_by_relevance_then_value : set_sort_by_relevance
>   2 - value ? set_sort_by_value_then_relevance : set_sort_by_relevance
>
>  Also for testing, we'd benefit from a simple HTTP-fronted Node app to
>>> which a user can post documents and submit queries. We could pull an
>>> interesting corpus into that, e.g. Wikipedia...
>>>
>>
>
>>  Sure, that sounds great, but for the code writing I think that specific
>> unit tests with predictable answers are more useful to me. The HTTP-fronted
>> Node app looks more like a great "getting started" app, which I'll add to
>> my todo list.
>>
>
> Yes, you need unit tests ported from Perl, for sure. The Node app is to
> test the whole system, evaluate performance, etc
>
> Liam
>
> _______________________________________________
> Xapian-devel mailing list
> Xapian-devel at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120503/02015c29/attachment-0001.htm>


More information about the Xapian-devel mailing list