Jim Lynch
2006-Apr-09 13:32 UTC
[Xapian-discuss] Searching for title (omega) isn't doing what I expected.
I added a
$setmap{prefix,author,A,title,S}
To my xml template so I could search on the title field and it returned
a number of hits, but the fields were empty. Here's the relevant output:
omega.cgi?FMT=xml&xFILTERS=--O&DB=/irix&DEFAULTOP=and&P=title:sound
<results Query="title:sound" TopDoc="0"
Matches="250" Last="10"
ThisPage="1" LastPage="25" xP="Ssound."
xDB="irix">
?
<topterms>
<topterm term="sound" show="sound"
freq="4569"/>
...<snip>
</topterms>
?
<queryterms>
<queryterm term="Ssound" show="sound"
freq="250"/>
</queryterms>
?
<hits>
?
<hit id="54439" relevance="100%" reference=""
title="" subject=""
date="" stringdate="" db="" daterev=""
author="" recdate="" score="10"
sample="" example="">
<keywords>
</keywords>
?
<terms>
<term term="Ssound" show="sound"/>
</terms>
</hit>
?
<hit id="54440" relevance="84%" reference=""
title="" subject="" date=""
stringdate="" db="" daterev="" author=""
recdate="" score="8" sample=""
example="">
<keywords>
</keywords>
?
<terms>
<term term="Ssound" show="sound"/>
</terms>
</hit>
If I search for "sound" I get a larger number of hits and the
attributes
in the "hit" element have valid data. Do I have to do something
special
to the xml template other than adding the "set" statement? It's
essentially the same as the distributed version with a few extra or
modified statements in the "hit" area.
<hit id="$id" relevance="$percentage%"
reference="$html{$field{reference}}"
title="$html{$field{title}}"
subject="$html{$field{title}}"
date="$html{$field{unixdate}}"
stringdate="$html{$field{stringdate}}"
db="$html{$field{db}}" daterev="$html{$field{daterev}}"
author="$html{$field{author}}"
recdate="$html{$field{recdate}}"
$if{$field{language},language="$field{language}",}
$if{$field{size},size="$html{$field{size}}",}
$if{$field{sitename},sitename="$html{$field{sitename}}",}
score="$html{$score}"
sample="$html{$htmlstrip{$field{sample}}}"
example="$html{$highlight{$htmlstrip{$field{sample}},$terms,<strong
$cgi{HILITECLASS}>}}"
$if{$ne{$collapsed,0}, collapsecount="$html{$collapsed}"
collapsegroup="$html{$value{$cgi{COLLAPSE}}}"}
>
Thanks,
Jim.
Olly Betts
2006-Apr-09 14:13 UTC
[Xapian-discuss] Searching for title (omega) isn't doing what I expected.
I don't see why this shouldn't work unless some documents just don't have their document data set correctly. On Sun, Apr 09, 2006 at 08:32:59AM -0400, Jim Lynch wrote:> <hit id="54439" relevance="100%" reference="" title="" subject=""Take a look at document id 54439's data: delve /path/to/database -d -r 54439 Cheers, Olly