Opened 12 years ago

Closed 12 years ago

#600 closed defect (fixed)

Lua example bindings do not work

Reported by: Veniamin Gvozdikov Owned by: Olly Betts
Priority: normal Milestone: 1.2.13
Component: Xapian-bindings (Lua) Version: 1.2.12
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

I have xapian-bindings-1.2.12 on FreeBSD 8.2 amd64 box. I've try indexing file and then search, but lua simplesearch from examples do not work.

-- Outputs from testing scripts. -- Python - is work fine:

 [search] 00:35 %> python
 /usr/local/share/doc/xapian-bindings/python/examples/simplesearch.py
 ./ test
 Parsed query is: Xapian::Query(Ztest:(pos=1))
 3 results found.
 Results 1-3:
 1: 100% docid=25 [2. Subject to the terms and conditions of this
 BeOpen Python License Agreement, BeOpen hereby grants Licensee a
 non-exclusive, royalty-free, world-wide license to reproduce, analyze,
 test, perform and/or display publicly, prepare derivative works,
 distribute, and otherwise use the Software alone or in any derivative
 version, provided, however, that the BeOpen Python License is retained
 in the Software, alone or in any derivative version prepared by
 Licensee.]
 2: 93% docid=15 [2. Subject to the terms and conditions of this
 License Agreement, PSF hereby grants Licensee a nonexclusive,
 royalty-free, world-wide license to reproduce, analyze, test, perform
 and/or display publicly, prepare derivative works, distribute, and
 otherwise use Python alone or in any derivative version, provided,
 however, that PSF's License Agreement and PSF's notice of copyright,
 i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
 2009, 2010 Python Software Foundation; All Rights Reserved" are
 retained in Python alone or in any derivative version prepared by
 Licensee.]
 3: 69% docid=33 [2. Subject to the terms and conditions of this
 License Agreement, CNRI hereby grants Licensee a nonexclusive,
 royalty-free, world-wide license to reproduce, analyze, test, perform
 and/or display publicly, prepare derivative works, distribute, and
 otherwise use Python 1.6.1 alone or in any derivative version,
 provided, however, that CNRI's License Agreement and CNRI's notice of
 copyright, i.e., "Copyright (c) 1995-2001 Corporation for National
 Research Initiatives; All Rights Reserved" are retained in Python
 1.6.1 alone or in any derivative version prepared by Licensee.
 Alternately, in lieu of CNRI's License Agreement, Licensee may
 substitute the following text (omitting the quotes): "Python 1.6.1 is
 made available subject to the terms and conditions in CNRI's License
 Agreement.  This Agreement together with Python 1.6.1 may be located
 on the Internet using the following unique, persistent identifier
 (known as a handle): 1895.22/1013.  This Agreement may also be
 obtained from a proxy server on the Internet using the following URL:
http://hdl.handle.net/1895.22/1013".]

-- Lua do not work:

 [search] 00:35 %> lua-5.1
 /usr/local/share/doc/xapian-bindings/lua/examples/simplesearch.lua ./
 test
 lua-5.1: ...re/doc/xapian-bindings/lua/examples/simplesearch.lua:47:
 attempt to call method 'get_description' (a nil value)
 stack traceback:
         ...re/doc/xapian-bindings/lua/examples/simplesearch.lua:47: in main chunk

Change History (2)

comment:1 by Olly Betts, 12 years ago

Milestone: 1.2.x1.2.13
Owner: changed from sabrina to Olly Betts
Severity: majorminor
Status: newassigned
Version: 1.2.12

OK, the issue is that query:get_description() should be str(query) - this got changed at some point during development of the Lua bindings, but the examples weren't updated to match.

Fixed in trunk r16805. Needs backporting to the 1.2 branch.

comment:2 by Olly Betts, 12 years ago

Resolution: fixed
Status: assignedclosed

Backported for 1.2.13 in r16825. Thanks for your report.

Note: See TracTickets for help on using tickets.