2 May 2012 22:14
Re: GSoC xapian node binding
Liam <xapian <at> networkimprov.net>
2012-05-02 20:14:15 GMT
2012-05-02 20:14:15 GMT
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:
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
Yes, you need unit tests ported from Perl, for sure. The Node app is to test the whole system, evaluate performance, etc
Liam
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.mdI 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
RSS Feed