在学习过程中,将做工程过程中经常用到的内容段做个珍藏,如下的内容段是关于xapian通过python实现的一个简单的范围查询的例子的内容,希望对各位有一些好处。
#!/usr/bin/env python
#
# Simple command-line ValueRangeProcessor example. Takes as an argument
# the value number to apply numeric ranges to.
#
# Copyright (C) 2003,2008 James Aylett
# Copyright (C) 2004,2007 Olly Betts
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin