[Xapian-devel] Add an example to the community page and contribute more code

aarsh shah aarshkshah1992 at gmail.com
Wed Jan 23 05:15:42 GMT 2013

Hi Olly :) I guess you are busy these days.So I read up about contributing
to organizations and am getting familiar with git/github. Looks quite
complicated,cool and fun .Ill need a couple of days to get familiar with
it.Will send a pull request for the stemmer in a couple of days.Please can
you just let me know about the  documentation standards
and expectations that the community has.Want to document the stemmer code
as nicely as I can :)


On Tue, Jan 22, 2013 at 12:16 AM, aarsh shah <aarshkshah1992 at gmail.com>wrote:

> Dear  Olly,
>                Hi,hope you are fine :) I have finished implementing the
> Paice Husk Stemmer and have also successfully used it along with Xapian
> .Thank you so so much , couldn't have done this without your help.:) Am
> feeling like a member of the Xapian community now :)
> The class and the struct definition ( Rulelist structure) are in a file
> paicehusk.h and the function implementations are in paicehusk.cc .I can
> mail you the two files if you would like to see them.I now want to
> incorporate it in the library package  so that all members of the community
> can use it.Please can you help me with that as I have never done anything
> of that sort before(have never used git or SVN before,but will learn how to
> use git tonight ) .Also,I've documented the code as well as I could but I'm
> not sure if it meets the standards of the community.
> I now want to work on Eset but will talk about that after I incorporate
> PaiceHusk in the library.Will upload a couple of examples Ive written for
> the community page tomorrow.
> Thank you once again. :)
> -Regards
> -Aarsh
> On Sun, Jan 20, 2013 at 1:10 PM, Olly Betts <olly at survex.com> wrote:
>> On Mon, Jan 21, 2013 at 12:21:51AM +0530, aarsh shah wrote:
>> > Hey there Olly,hope you are fine . :) I have the code for Paice Husk
>> ready
>> > .But I am not being able to modify the Xapian source code I have
>> downloaded.
>> >
>> > I modified the stem.cc file so that get_description() returns a default
>> > welcome string insead of calling the internal get_description() method
>> > (just for fun ) .I than used make and make install again and then wrote
>> a
>> > simple indexer which called the stem.get_description() method .However,I
>> > got the original string instead of the one I had modified.Why didn't the
>> > change I had made get reflected ? I know this is a naive question but I
>> am
>> > new to open source and have never modified open source code before.Sorry
>> > for taking up your time.I tried everything I could ,( even built the
>> entire
>> > code again) but nothing happened.
>> It's not a naive question, though I suspect it is a common pitfall
>> you've run into.
>> If you're on a platform where Xapian is installed by default, such as
>> Debian or Ubuntu, then you'll already have a copy of the xapian runtime
>> shared library installed in /usr/lib (or some equivalent multiarch
>> directory, such as /usr/lib/x86_64-linux-gnu).  The exact filename
>> will depend on the OS and the version of Xapian, but for xapian-core 1.2
>> on Linux, it's libxapian.so.22 (the 22 tells you this is ABI compatible
>> with other builds which produce libxapian.so.22).
>> If you build a version of xapian-core which produces libxapian.so.22
>> (which roughly speaking means any version 1.2.x), and install this, it
>> will go in /usr/local/lib by default, but the dynamic linker will look
>> under /usr/lib first and find the system version.
>> On Linux, you can see which libxapian you're getting by running "ldd" on
>> a binary:
>> $ ldd /usr/bin/xapian-compact
>>         linux-vdso.so.1 =>  (0x00007fff3855e000)
>>         libxapian.so.22 => /usr/lib/libxapian.so.22 (0x00007f544c029000)
>> [snip]
>> On Linux, you can set LD_LIBRARY_PATH to tell the dynamic linker where
>> to look first (other platforms usually have a similar environmental
>> variable, but it may have a different name):
>> $ LD_LIBRARY_PATH=/usr/local/lib ldd /usr/bin/xapian-compact
>>         linux-vdso.so.1 =>  (0x00007fffb03ff000)
>>         libxapian.so.22 => /usr/local/lib/libxapian.so.22
>> (0x00007f0c22fda000)
>> None of this is specific to Xapian (except the filenames in the
>> examples) - you'll hit the same issues dealing with parallel installs of
>> any shared library.
>> > The code for the paice husk stemmer is ready and Ive understood how to
>> use
>> > it for indexing.Ir am supposed to inherit Xapian::StemImplementation
>> > ,implement the pure virtual  functions(have already done that)  and than
>> > pass a reference  to the inherited object to
>> > Xapian::Stem::Stem(StemImplementaion *pointer) ,right ? :)
>> To be clear, you pass a pointer, not a reference (the two terms have
>> particular meanings in C++).  Note that the Stem object you construct
>> takes ownership of the pointer, so you want to create your subclass
>> object with new, e.g.:
>>     Xapian::Stem s(new StemImplementationPaiceHusk());
>> Cheers,
>>     Olly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130123/cf1a09a5/attachment.htm>

More information about the Xapian-devel mailing list