]> Sergey Matveev's repositories - public-inbox.git/commit
searchidx: rename get_val to int_val and return IV
authorEric Wong <e@80x24.org>
Mon, 21 Dec 2020 07:51:21 +0000 (07:51 +0000)
committerEric Wong <e@80x24.org>
Mon, 21 Dec 2020 21:51:58 +0000 (21:51 +0000)
commit427b4fbbc68e4e03b20d66062dd47a0213e18390
treefe5bbd9aa2fe7b51852cd6b4733b53ce2a6118b9
parent3e9888ed30b7fe092b03789d19a8020d4bc0fb39
searchidx: rename get_val to int_val and return IV

Values can be strings in Xapian, although we currently use
integer values exclusively.  Give the wrapper a more appropriate
name in case we start using string columns.

For future-proofing, we'll now return `undef' on missing columns
and coerce the return value to an IV (integer value) to save
memory, as sortable_unserialise returns a PV (pointer value)
scalar despite it existing to support numeric values.
lib/PublicInbox/SearchIdx.pm
t/search.t