[Xapian-discuss] Searching Databases
Olly Betts
olly at survex.com
Tue Dec 13 12:30:51 GMT 2005
On Mon, Dec 12, 2005 at 11:40:56AM -0600, Tony Lambiris wrote:
> Sorry, was it this instead:
> if (*it != '&' || *it != '\'') break;
>
> Im not a super C person, but it seems like you would need an OR
> statement if the if function is checking the same pointer?
No, it should be &&. With || the whole expression will always be true,
because *it can't be both '&' and '\' at once so at least one side of
the || will always be true.
Perhaps it's clearer if you pull out the not:
(*it != '&' && *it != '\'') -> !(*it == '&' || *it == '\'')
> Sorry, one more question -- does this change work right away, or will I
> have to reindex my data source?
I had assumed you'd written your own indexer which was treating an
embedded apostrophe as a word character (though rereading your original
message it doesn't say if you have or not). But if you have, then you
don't need to reindex.
If you're using omindex or scriptindex you'll need to make the
corresponding change to indextext.cc (again, just follow how '&'
is handled), rebuild, and reindex.
Cheers,
Olly
More information about the Xapian-discuss
mailing list