aarsh shah
2013-Jan-27 20:09 UTC
[Xapian-devel] Added a python example to the community page
Hey guys,I have added a python indexer example to the SampleCode page of our wiki.Please do have a look.The code can also be found here :- https://github.com/aarshkshah1992/xapian/blob/efcf443527b74326119bbc0935fc41a002ce60db/xapian-bindings/python/docs/examples/simpleindexgrep.py/ Thanks :) -Regards -Aarsh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130127/b181ca76/attachment.html>
James Aylett
2013-Feb-07 21:41 UTC
[Xapian-devel] Added a python example to the community page
On 27 Jan 2013, at 20:09, aarsh shah <aarshkshah1992 at gmail.com> wrote:> Hey guys,I have added a python indexer example to the SampleCode page of our wiki.Please do have a look.The code can also be found here :- > > https://github.com/aarshkshah1992/xapian/blob/efcf443527b74326119bbc0935fc41a002ce60db/xapian-bindings/python/docs/examples/simpleindexgrep.py/Aarsh ? what are you actually trying to do here? Because what your comments say you're doing isn't what the code does. Three problems: 1) English uses capitals at the start of sentences, so you're actually just indexing more or less everything 2) you're running xapian.TermGenerator.index_text() on single words, which isn't really what it's designed to do (it has its own word-splitting algorithm) 3) you don't support sentences broken across lines, which doesn't match the majority of use cases ? although you may have a particular one in mind Does what you're trying to do show how to use an aspect of Xapian that we don't already show in the existing examples? Or at least show it more clearly? J -- James Aylett, occasional trouble-maker xapian.org