[Xapian-discuss] Contextual search via xapian

Richard Boulton richard at lemurconsulting.com
Wed Jul 16 10:56:27 BST 2008


Denis Kuzmenok wrote:
>> If what you're looking for is simply an operator which matches words
>> within a given window, and in a given order, you need the OP_PHRASE 
>> query operator.  See the documentation comment in 
>> xapian-core/include/xapian/query.h for details.
> 
>> If that's not what you're looking for, perhaps you could give a piece of
>> sample code / commands and data, which we can run, and the results you
>> would like the code to produce.  We might then be able to tell you how
>> to change your code to get the desired results.
> 
> Example:

I'm sorry - I still don't understand what you're actually doing, and 
what you were expecting or would like to happen.

It's probably a language issue, but the easiest way around this is for 
you to give step-by-step instructions on what you're doing, together 
with what you'd expect to happen.  For example:

Step 1: make a subdirectory to contain data, called "data".

Step 2: put the following contents into a text file, called "data/data.txt":

Nokia today introduced their latest thin profile S40 handset to the 
world. The new 6500 Classic, housed in anodized aluminum, measures only 
9.5mm (.37") in thickness and weighs only 94g (3.3oz). Nokia says that 
the polished finish on each individual 6500 Classic will be different, 
making sure that no two phones are exactly alike. The display front face 
also gets the benefit of some polishing, but in this case it is done 
with diamonds.

Step 3: run omindex with the following command "./omindex --db db data/"
Got the following output, as expected:

omindex: --url not specified, assuming `/'.
[Entering directory /]
Indexing "/data.txt" as text/plain ... added.


etc.  Give us enough information so that we can see what you're doing, 
and we'll be much more likely to be able to help.

-- 
Richard



More information about the Xapian-discuss mailing list