[Xapian-devel] Added a python example to the community page
James Aylett
james-xapian at tartarus.org
Thu Feb 7 21:41:10 GMT 2013
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
More information about the Xapian-devel
mailing list