I'm not sure what stability you mean, but ok; it's possible to do
this, but you'll need to understand a bit more about xapian internals.
I think you'll end up replicating chunks of xappy, so I wouldn't take
this approach, personally.
I think the problem in this case is that the INDEX_EXACT action
doesn't store an unprefixed version of the term. For an
INDEX_FREETEXT action, the text "dbus" will get indexed both as "dbus"
(for non field-specific searches) and also as something like "XAdbus"
for field specific searches. (dbus may also be stemmed, depending on
settings). For an index exact field, you'll just get soemthing like
the "XAdbus" field.
To search this using pure xapian, you'll have to look up what the
prefix to insert is by reading and unpacking the metadata key stored
by xappy which holds this configuration, and give it to the query
parser by calling qp.add_boolean_prefix().
Really, I recommend you use xappy for searches too.
--
Richard
Thanks for you reply. I hope I didn't come off as offensive but as it
is the stable version of xappy doesn't quite have everything we need
so I am using the version in svn and even then our requirements are
somewhat different which is always the issue between high level
interfaces and low level capabilities. Due to the sparse
documentation of xapian itself I do want to know the internals and how
it is doing its matching so that we can tweak it if need be. Xappy
has given us a great jumping off point in that respect but for
instance I don't need the stored document to be pickled - json would
work better for us as we are simply storing strings, lists and hashes.
This seems easy to switch out by not marking any fields as
STORE_CONTENT and setting the data in the xapian document before it is
saved to the db.
> I think the problem in this case is that the INDEX_EXACT action
> doesn't store an unprefixed version of the term. For an
> INDEX_FREETEXT action, the text "dbus" will get indexed both as "dbus"
> (for non field-specific searches) and also as something like "XAdbus"
> for field specific searches. (dbus may also be stemmed, depending on
> settings). For an index exact field, you'll just get soemthing like
> the "XAdbus" field.
> To search this using pure xapian, you'll have to look up what the
> prefix to insert is by reading and unpacking the metadata key stored
> by xappy which holds this configuration, and give it to the query
> parser by calling qp.add_boolean_prefix().
Ah, that makes sense. I was looking at the debian xapian package
search and they did something like this. It didn't dawn on me how
this worked but now I understand the matching a bit better. Thanks.
> Really, I recommend you use xappy for searches too.
>
> --
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups "xappy-discuss" group.
> To post to this group, send email to xappy-...@googlegroups.com.
> To unsubscribe from this group, send email to xappy-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xappy-discuss?hl=en.
>
>