Leslie Hawthorn | 2 Apr 20:24
Picon

Feedback on Listing at teachingopensource.org

Hello Xapian Developers,

I am writing with feedback on your Help Wanted listing at teachingopensource.org, specifically http://www.teachingopensource.org/index.php/Help_Wanted:_Xapian

Overall, I think your project listing looks very well done. On your ideas page, you haven't done a lot to sell/market each idea. Why is development of this specific project going to improve Xapian overall? How will that improvement empower/improve some of the downstream projects you mention use Xapian (e.g. Debian, OLPC).

I think you'll see more interest from students if you jazz up the listings a bit. I think for professors it's probably fine as is, though some verbiage about why having a good fundamental understanding of search is a good thing for students would be useful to both parties.

I'd like to organize an IRC meeting for the folks who have signed up  on the teachingopensource.org FOSS Mentor Projects wiki page, and plan  to organize the meeting time, etc., on the teachingopensource.org  mailing list. Would whomever from your team is interested in attending  please ensure that you're signed up on this mailing list? It's pretty  low traffic and I will prefix all messages with [MENTORS] in the subject line so you can further filter your mail.

http://teachingopensource.org/mailman/listinfo/tos

I'm hoping to schedule this meeting to take place the week of April 20th so this should give you some time to subscribe.

Looking forward to working with you folks!

Cheers,
LH

-----
Leslie Hawthorn
http://www.hawthornlandings.org
http://identi.ca/lh
http://www.twitter.com/lhawthorn


_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Olly Betts | 8 Apr 06:11
Favicon
Gravatar

Re: Feedback on Listing at teachingopensource.org

On Thu, Apr 02, 2009 at 11:24:21AM -0700, Leslie Hawthorn wrote:
> I am writing with feedback on your Help Wanted listing at
> teachingopensource.org, specifically
> http://www.teachingopensource.org/index.php/Help_Wanted:_Xapian

Just to fill in the background for other list readers, I added our
listing here - the idea is to advertise that we're willing to mentor
(and otherwise work with) people teaching open source and students.

Information Retrieval has a long academic history (more than 60 years)
and Xapian's underpinnings come from that.  I believe it would benefit
us greatly to have more contact with people at the forefront of that
research, as would input from young and enthusiastic developers.

> Overall, I think your project listing looks very well done. On your ideas
> page, you haven't done a lot to sell/market each idea. Why is development of
> this specific project going to improve Xapian overall? How will that
> improvement empower/improve some of the downstream projects you mention use
> Xapian (e.g. Debian, OLPC).

Fair criticism.  I've started to work through the list (but I've only
managed one entry so far) - if other people want to help, feel free.

It would be good to get it overhauled by April 20th, as I understand
that Leslie plans to direct unsuccessful student GSoC applicants to it.
A lot of promising students fail to get places, and some are interested
in getting involved with an Open Source project even without the
stipend.

> I'd like to organize an IRC meeting for the folks who have signed up on the
> teachingopensource.org FOSS Mentor Projects wiki page, and plan to organize
> the meeting time, etc., on the teachingopensource.org mailing list. Would
> whomever from your team is interested in attending please ensure that
> you're signed up on this mailing list?

I have subscribed to the list, and am happy to attend the IRC meeting
(though I'm in UTC+12 so depending when what time it is it might fit
better with someone else if anyone else is interested).

Thanks for your feedback Leslie,

Cheers,
    Olly
Leslie Hawthorn | 9 Apr 04:06
Picon

Re: Feedback on Listing at teachingopensource.org



On Tue, Apr 7, 2009 at 9:11 PM, Olly Betts <olly <at> survex.com> wrote:
I have subscribed to the list, and am happy to attend the IRC meeting
(though I'm in UTC+12 so depending when what time it is it might fit
better with someone else if anyone else is interested).

Thanks for your feedback Leslie,

Excellent, glad to have you on board. :)

Best,
LH


--
Leslie Hawthorn
http://www.hawthornlandings.org
http://identi.ca/lh
http://www.twitter.com/lhawthorn
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Kosei MORIYAMA | 13 Apr 22:21
Picon

Test of Search::Xapian::Writable Database, and how to send a patch

Hello Xapian developers,

I'm Kosei MORIYAMA. I'm a student application gsoc 2009, Xapian and
SWIG project.

I wrote a test, search-xapian/t/writable database.t , which tests
methods of Search::Xapian::Writable Database, replace_document,
replace_document_by_term, delete_document and delete_document_by_term.

Then I thought to send a patch of this test to be reviewed. Following
xapian-core/HACKING file's 'Submitting Patches' section, run following
command,

$ svn diff > writable database.diff

and attach this file to this mail.

Is this correct way of sending patch? And Do I need to send any other
information about this patch?

Cheers,
Kosei MORIYAMA
Index: writabledatabase.t
===================================================================
--- writabledatabase.t	(revision 0)
+++ writabledatabase.t	(revision 0)
@@ -0,0 +1,203 @@
+#!/usr/bin/perl -W
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
+
+#########################
+
+use Test::More;
+if ($] < 5.008007) {
+    plan skip_all => 'Test requires Perl >= 5.8.7';
+} else {
+    # Number of test cases to run - increase this if you add more testcases.
+    plan tests => 34;
+}
+
+use Search::Xapian qw(:standard);
+
+
+# first create database dir, if it doesn't exist;
+my $db_dir = 'testdb';
+
+if( (! -e $db_dir) or (! -d $db_dir) ) {
+  mkdir( $db_dir );
+}
+
+opendir( DB_DIR, $db_dir );
+while( defined( my $file = readdir( DB_DIR ) ) ) {
+  next if $file =~ /^\.+$/;
+  unlink( "$db_dir/$file" ) or die "Could not delete '$db_dir/$file': $!";
+}
+closedir( DB_DIR );
+
+my $create = Search::Xapian::WritableDatabase->new( $db_dir, Search::Xapian::DB_CREATE );
+
+$create = undef;
+
+my $write = Search::Xapian::WritableDatabase->new( $db_dir, Search::Xapian::DB_CREATE_OR_OPEN );
+
+# Let's try to index something.
+my $term = 'test';
+
+my $docid;
+for my $num (1..1000) {
+  my $doc = Search::Xapian::Document->new();
+
+  $doc->set_data( "$term $num" );
+
+  $doc->add_posting( $term, 0 );
+  $doc->add_posting( $num, 1 );
+
+  $doc->add_value(0, $num);
+  $write->add_document( $doc );
+} 
+$write->flush();
+
+for my $num qw (three four five) {
+  my $doc = Search::Xapian::Document->new();
+
+  $doc->set_data( "$term $num" );
+
+  $doc->add_posting( $term, 0 );
+  $doc->add_posting( $num, 1 );
+
+  $doc->add_value(0, $num);
+  $write->add_document( $doc );
+  $write->flush();
+}
+$write->flush();
+
+my $doccount = $write->get_doccount();
+is($doccount, 1003, "check number of documents in WritableDatabase");
+
+# replace document by docidb
+my $repdoc = Search::Xapian::Document->new();
+my $num = "six";
+$term = "test";
+$docid = 500;
+$repdoc->set_data( "$term $num" );
+$repdoc->add_posting( $term, 0 );
+$repdoc->add_posting( $num, 1 );
+$repdoc->add_value(0, $num);
+
+ok(!$write->term_exists($num), "check term exists");
+is($write->get_document($docid)->get_data(), "$term $docid", "check document data");
+
+$write->replace_document($docid, $repdoc);
+$write->flush();
+
+ok($write->term_exists($num), "check term exists");
+is($write->get_document($docid)->get_data(), "$term $num", "check document data");
+
+# replace document by term
+$repdoc = Search::Xapian::Document->new();
+$term = "test";
+$num = "seven";
+$repdoc->set_data( "$term $num" );
+$repdoc->add_posting( $term, 0 );
+$repdoc->add_posting( $num, 1 );
+$repdoc->add_value(0, $num);
+$repterm = "five";
+
+ok(!$write->term_exists($num), "check term exists");
+ok($write->term_exists($repterm), "check term exists");
+is($write->get_termfreq($num), 0, "check term frequency");
+is($write->get_termfreq($repterm), 1, "check term frequency");
+
+$write->replace_document_by_term($repterm, $repdoc);
+$write->flush();
+
+ok($write->term_exists($num), "check term exists");
+ok(!$write->term_exists($repterm), "check term exists");
+is($write->get_termfreq($num), 1, "check term frequency");
+is($write->get_termfreq($repterm), 0, "check term frequency");
+
+# replace document by term, if term is new
+$repdoc = Search::Xapian::Document->new();
+$term = "test";
+$num = "eight";
+$repdoc->set_data( "$term $num" );
+$repdoc->add_posting( $term, 0 );
+$repdoc->add_posting( $num, 1 );
+$repdoc->add_value(0, $num);
+
+is($write->get_termfreq($term), $doccount, "check term frequency");
+is($write->get_termfreq($num), 0, "check term frequency");
+
+$write->replace_document_by_term($num, $repdoc);
+$write->flush();
+
+is(++$doccount, 1004, "check doccount");
+is($write->get_termfreq($term), $doccount, "check term frequency");
+is($write->get_termfreq($num), 1, "check term frequency");
+
+# replace document by term.
+# if there are any documents which has same term, the document which has smallest id is replaced.
+$repdoc = Search::Xapian::Document->new();
+$term = "test";
+$num = "nine";
+$repdoc->set_data( "$term $num" );
+$repdoc->add_posting( $term, 0 );
+$repdoc->add_posting( $num, 1 );
+$repdoc->add_value(0, $num);
+
+$write->replace_document_by_term($term, $repdoc);
+$write->flush();
+my $doc = $write->get_document(1);
+
+is($write->get_doccount(), 1, "check document count");
+is($doc->get_data(), "$term $num", "check document data");
+
+# add documents for following tests
+for my $num qw (one two three four five) {
+  my $doc = Search::Xapian::Document->new();
+
+  $doc->set_data( "$term $num" );
+
+  $doc->add_posting( $term, 0 );
+  $doc->add_posting( $num, 1 );
+
+  $doc->add_value(0, $num);
+  $write->add_document( $doc );
+  $write->flush();
+}
+$write->flush();
+
+$doccount = $write->get_doccount();
+is($doccount, 6, "check number of documents in WritableDatabase");
+
+# delete document by docid
+my $lastdocid = $write->get_lastdocid();
+my $lastdocterm = $write->get_document($lastdocid)->get_value(0);
+ok($write->term_exists($lastdocterm), "check term exists");
+
+$write->delete_document($lastdocid);
+$write->flush();
+
+is($write->get_doccount(), $doccount - 1, "check number of documents in WritableDatabase");
+ok(!$write->term_exists($lastdocterm), "check term exists");
+
+# delete document by term
+my $delterm = 'three';
+ok($write->term_exists($delterm), 'check term exists before deleting a document');
+is($write->get_termfreq($delterm), 1, 'check term frequency before deleting a document');
+
+$write->delete_document_by_term($delterm);
+$write->flush();
+
+is($write->get_doccount(), $doccount - 2, 'check WritableDatabase after deleting a document');
+ok(!$write->term_exists($delterm), 'check term exists after deleting a document');
+is($write->get_termfreq($delterm), 0, 'check term frequency after deleting a document');
+
+# delete documents by term
+$delterm = 'test';
+ok($write->term_exists($delterm), 'check term exists of documents which has term "test"');
+is($write->get_termfreq($delterm), $doccount - 2, 'check term frequency of term "test"');
+
+$write->delete_document_by_term($delterm);
+$write->flush();
+
+is($write->get_doccount(), 0, 'check WritableDatabase after deleting all documents');
+ok(!$write->term_exists($delterm), 'check term exists after deleting all documents');
+is($write->get_termfreq($delterm), 0, 'check term frequency after deleting all documents');
+
+1;
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Richard Boulton | 13 Apr 22:27

Re: Test of Search::Xapian::Writable Database, and how to send a patch

On Tue, Apr 14, 2009 at 05:21:36AM +0900, Kosei MORIYAMA wrote:
> I'm Kosei MORIYAMA. I'm a student application gsoc 2009, Xapian and
> SWIG project.
> 
> I wrote a test, search-xapian/t/writable database.t , which tests
> methods of Search::Xapian::Writable Database, replace_document,
> replace_document_by_term, delete_document and delete_document_by_term.
> 
> Then I thought to send a patch of this test to be reviewed. Following
> xapian-core/HACKING file's 'Submitting Patches' section, run following
> command,
> 
> $ svn diff > writable database.diff
> 
> and attach this file to this mail.

Thanks for the patch.

> Is this correct way of sending patch? And Do I need to send any other
> information about this patch?

The best thing to do with patches is to make a ticket for them in our trac
instance (at http://trac.xapian.org/).  This way, they don't get lost and
forgotten.  Also, large patches may not be accepted by the mailing list
software (it has a size limit, though I can't remember how large that limit
is off-hand).

Generally, with a patch you should include an explanation of why the patch
is a good idea.  In this case, I don't think there's anything obvious extra
that needs to be included.

--

-- 
Richard
Kosei MORIYAMA | 13 Apr 22:57
Picon

Re: Test of Search::Xapian::Writable Database, and how to send a patch

Thank you for your reply.

I see that I prefer to make ticket in trac. I also understood to
contain information why the patch is needed.

Now I wrote that test simply because there are no test of that
methods. As you pointed out, it seems that there are less nessecity
about this patch. I'll think it over once more.

Cheers,
Kosei

On Tue, Apr 14, 2009 at 5:27 AM, Richard Boulton
<richard <at> lemurconsulting.com> wrote:
> On Tue, Apr 14, 2009 at 05:21:36AM +0900, Kosei MORIYAMA wrote:
>> I'm Kosei MORIYAMA. I'm a student application gsoc 2009, Xapian and
>> SWIG project.
>>
>> I wrote a test, search-xapian/t/writable database.t , which tests
>> methods of Search::Xapian::Writable Database, replace_document,
>> replace_document_by_term, delete_document and delete_document_by_term.
>>
>> Then I thought to send a patch of this test to be reviewed. Following
>> xapian-core/HACKING file's 'Submitting Patches' section, run following
>> command,
>>
>> $ svn diff > writable database.diff
>>
>> and attach this file to this mail.
>
> Thanks for the patch.
>
>> Is this correct way of sending patch? And Do I need to send any other
>> information about this patch?
>
> The best thing to do with patches is to make a ticket for them in our trac
> instance (at http://trac.xapian.org/).  This way, they don't get lost and
> forgotten.  Also, large patches may not be accepted by the mailing list
> software (it has a size limit, though I can't remember how large that limit
> is off-hand).
>
> Generally, with a patch you should include an explanation of why the patch
> is a good idea.  In this case, I don't think there's anything obvious extra
> that needs to be included.
>
> --
> Richard
>
DYH1919 | 14 Apr 13:30
Picon
Gravatar

how can i get start xapian with php

I have install xapian-bindings success , the xapian info can be founed with phpinfo() function .
but how can i use xapian to search my site , i can't find enough information to start

there is some case supported by  xapian.org : http://xapian.org/docs/bindings/php/
but it didn't show how can i create a search engine step by step, is any phper or others can help me?

thanks!

--
==无==敌==邮==件==签==名==线==
我的博客,白板博客,IT 生活类博客!
博客:http://www.oblank.com

_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
白俊良 | 15 Apr 04:46
Picon

questions about xapian

Hi! Alls

     i have read code of xapian more than one month,i leant a lot from your code
both form design of search engine and code details.
     however, something make me in a puzzle.
     Take  RefCntBase as an example, it seems that it is a "kernel" of xapian, as
many classes inherit from it. But,what is it funtion? why is it so important?
     Another confusion is about Valuerangeprocess. I really want to make clear
differences between valuerange-search and common search in details. I added  
   Xapian::DateValueRangeProcessor date_proc(2, true, 1930);
    qp.add_valuerangeprocessor(&date_proc);  
in my code and my code works well. then, I debug it using gdb. however,i can not be inspired. Is there any important information i did not catch?

would you please give me some advice?

thanks a lot!

baijl
更多热辣资讯尽在新版MSN首页! 立刻访问!
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
白俊良 | 15 Apr 14:54
Picon

does xapian have these disadvantages?

hi! alls
 
i have read an article about comments on Lucene.
http://www.jroller.com/melix/entry/why_lucene_isn_t_that
 
i have more understanding about Lucene through this article,especially its disadvantage or limitation.
 
then i would like to question that are there similar disadvantages to xapian?
 
any advice would be appreciated.
 
baijl
 
 

立刻下载 MSN 保护盾,保障Messenger 安全稳定! 现在就下载!
_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Kevin Duraj | 15 Apr 20:15
Picon

Re: does xapian have these disadvantages?

Baijl,

Please do not bring Lucene problems and issues into Xapian discussion,
we are not here to solve their issues, but rather post your concerns
into Lucene mailing list. Based on my own opinion Lucene is the worst
search engine I had opportunity to work with, even Microsoft SQL
Server 2005 beats Lucene performance and quality of searches.

Kevin Duraj

2009/4/15 白俊良 <baijl03 <at> hotmail.com>:
>
> hi! alls
>
>
>
> i have read an article about comments on Lucene.
>
> http://www.jroller.com/melix/entry/why_lucene_isn_t_that
>
>
>
> i have more understanding about Lucene through this article,especially its disadvantage or limitation.
>
>
>
> then i would like to question that are there similar disadvantages to xapian?
>
>
>
> any advice would be appreciated.
>
>
>
> baijl
>
>
>
>
>
> _________________________________________________________________
> MSN 表情魔法书,改变你的对话时代!
> http://im.live.cn/emoticons/
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss <at> lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>

_______________________________________________
Xapian-discuss mailing list
Xapian-discuss <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss

Gmane