[Xapian-discuss] Problems with scriptindex

stephane altazin stephane.altazin at gmail.com
Mon Dec 5 09:29:35 GMT 2011


I have implemented  your suggestion, it works perferctly now. Thanks a lot.
I may have other questions in a next future
Best Regards
Stephane
2011/12/5 Olly Betts <olly at survex.com>

> On Fri, Dec 02, 2011 at 11:42:24AM +0100, stephane altazin wrote:
> > I am trying to use scriptindex but I get some problems :
> > 1) If my script file is empty I have an indexation by default, and I get
> > two output fields when I am using quest.exe (These fields are caption and
> > sample)
>
> You don't say what version you're using, but with the current 1.2 branch
> (which hasn't changed much since 1.2.7) I just get an empty document if
> the index script is empty (which is what I'd expect).
>
> Perhaps you didn't start from a clean database?  You can pass
> --overwrite to scriptindex to force it to empty the database first.
>
> On trunk, I've tweaked scriptindex to report an error if no rules were
> found in the index script, since the result (adding empty documents to
> the database) is clearly not useful.
>
> > 2) I then tryed to not use an empty script file defining this time my
> > own fields, but if I use quest to perform researches these fileds does
> > not appear in the output.
>
> Works for me:
>
> $ scriptindex tmp.db tmp.script tmp.data
> records (added, replaced, deleted) = (1, 0, 0)
> $ quest -d tmp.db picture
> Parsed Query: Xapian::Query(Zpictur:(pos=1))
> MSet:
> 1 [100%]
> author=Aristotle
> date=20041204
> translator=E. M. Edghill
> url='/phil/aristotle-categories-79.txt'
>
> Incidentally, I suspect you don't want those quotes around the URL -
> scriptindex doesn't expected quoted values - it'll assume quotes (and
> any other characters) are to be handled literally.
>
> Cheers,
>    Olly
>


More information about the Xapian-discuss mailing list