[Xapian-discuss] Matching exact phrases only

jarrod roberson jarrod at vertigrated.com
Tue Aug 8 19:40:36 BST 2006


I have got some thing similar to work using position information.

I am indexing paths

/this/is/a/path/to/file.txt

would get translated to

doc.add_posting( 'this', 1)
doc.add_posting( 'is', 2)
doc.add_posting( 'a', 3)
doc.add_posting( 'path', 3)
doc.add_posting( 'to', 4)
doc.add_posting( 'file.txt', 5)

then I can retreive it with a PHRASE query with positions

if you index your stuff the same way it might help.

doc.add_posting('london', 1)
vs
doc.add_posting('central', 1)
doc.add_postiong('london', 2)

will definately give different relvances and weights



More information about the Xapian-discuss mailing list