[Xapian-devel] Auto completion using xapian

James Aylett james-xapian at tartarus.org
Sun Oct 7 17:43:43 BST 2012

A query string such as "m*" is using the wildcard expansion operator – if you want to use the partial support, you don't want the * at the end of your query string.

It's also not clear from your message whether you've set a database before trying to parse your query. You need to do this, because Xapian's wildcard support (which is what partial uses) is done at query time, expanding to all the possibly matching terms, rather than at index time in an n-gram analyzer style.

If you still can't get this to work, try posting a complete program rather than just a snippet.


On 4 Oct 2012, at 18:20, Naveen A.N. <naveen at searchlabs.org> wrote:

> Hello,
> Do xapian has analyzer like EdgeNGram to use it for autocomplete.
> I am trying to use the auto completion using xapian.
> For example:
> e
> ex
> exa
> exam
> example 
> etc..
> so that we can get it. 
> I tried to use using the Partial flag but it dose not work Xapian::Query query = parser.parse_query("m*",parser.FLAG_PARTIAL);
> Do you have any example or any tutorial is appreciated.
> --Naveen. 
> _______________________________________________
> Xapian-devel mailing list
> Xapian-devel at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-devel

 James Aylett, occasional trouble-maker

More information about the Xapian-devel mailing list