[Xapian-discuss] Searching for title (omega) isn't doing what I expected.

Jim Lynch jim at fayettedigital.com
Sun Apr 9 13:32:59 BST 2006


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.



More information about the Xapian-discuss mailing list