[Xapian-discuss] Omega/omindex question.

Olly Betts olly at survex.com
Fri Feb 10 16:02:08 GMT 2006


On Fri, Feb 10, 2006 at 03:42:56PM +0000, James Aylett wrote:
> It's not entirely true to say that P="xxxx" means you are searching an
> index on some field - you're constructing a query against the terms
> that index the various documents in the database. Some terms are
> easily generated, but some have "term prefixes", which are mapped from
> their internal representation to more useful textual prefixes (and
> back), so Asomething and author:something are considered equivalent
> (modulo stemming).

And the mapping is something you set dynamically.  So you can offer
aliases (e.g. subject: and title:) and even translate then (so a frontend
for French speaking users might use nom: while the English frontend
uses name:, with both working the same).

> To search the body, then, you don't use a prefix in your query
> string.

Although if you want to allow "body:" to mean the same as no prefix, you
can just add a mapping for body to the empty prefix (I've not tested
this but it should work).

> (We need to separate this use of the word 'field'. In my view, the
> Document data should contain fields, and we should call these prefixes
> something else.)

We usually refer to the as prefixes, don't we?

Cheers,
    Olly



More information about the Xapian-discuss mailing list