[Xapian-discuss] Contextual search via xapian

Denis Kuzmenok forward_ua at ukr.net
Wed Jul 16 06:05:18 BST 2008


> 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 have this text:
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.
The 6500 Classic comes with a unique configuration of dual-band WCDMA support on top of its more conventional quad-band GSM/EDGE support. This candy bar handset supports the normal 2100MHz band used in Europe and much of the rest of the world, as well as one of the two North American UMTS bands: 850MHz. This means that the 6500 Classic should be able to get EDGE data on any GSM network, and manage 3G UMTS connections in most parts of the world, where available, as well. It doesn't have tri-band UMTS support, which would have been great, but this is certainly a step in the right direction.
The Nokia 6500 Classic sports a generous 1GB of internal storage capacity for use with music tracks or photos shot with its built-in 2 megapixel camera. Like the other two devices released today by Nokia, the 6500 Classic uses the new micro-USB connector for charging, headsets, and data connectivity.
Nokia expects the 6500 Classic to start shipping some time in the 3rd quarter of this year. It should be available for around 320EUR before taxes and subsidies.

(borrowed from http://www.mobileburn.com/review.jsp?Id=3414)

I have keywords:
nokia 6500 classic, nokia 6500, nokia classic, nokia, 6500 nokia.

The text contains all the words. I index keywords all separate items,
then i put text into query and i supposed to have results like: nokia
6500 classic, nokia 6500, nokia. Any of these keywords is in text, and
in the same order.. Going near would be perfect if i search keywords
through text, but not text through keywords..

Thanks




More information about the Xapian-discuss mailing list