[Xapian-discuss] Indexing, searching and sorting signed integers
Oliver Flimm
flimm at ub.uni-koeln.de
Fri Jul 5 15:27:43 BST 2013
Hi,
for a project we need to index, search and sort by negative integers
(years b.c.) in Xapian. Is this possible?
I already tried to index the negative integers including a search
prefix with add_term.
I have theses terms in my index
X7-58 X7-59 X7-60
But the query parser seems to ignores the dash when searching:
2013/07/05 15:57:53 DEBUG> Xapian.pm:812 OpenBib::Search::Backend::Xapian::parse_query - Xapian-Querystring: year:-59 - Xapian-Filterstring:
2013/07/05 15:57:53 DEBUG> Xapian.pm:292 OpenBib::Search::Backend::Xapian::search - Internal Xapian Query: Xapian::Query(X759:(pos=1))
I got the Internal Xapian Query with $enq->get_query()->get_description();
For the actual enquiry I used
my $enq = $dbh->enquire($self->{qp}->parse_query($fullquerystring,FLAG_WILDCARD|FLAG_BOOLEAN|FLAG_PHRASE));
with year:-59 as $fullquerystring and X7 as the search prefix for year.
I would have expected X7-59 for the internal query term... And of
course I only got results for a positive term 59 ;-)
Regards,
Oliver
--
Universitaet zu Koeln :: Universitaets- und Stadtbibliothek
IT-Dienste :: Abteilung Universitaetsgesamtkatalog
Universitaetsstr. 33 :: D-50931 Koeln
Tel.: +49 221 470-3330 :: Fax: +49 221 470-5166
flimm at ub.uni-koeln.de :: www.ub.uni-koeln.de
More information about the Xapian-discuss
mailing list