tata 668
2008-Dec-26 15:10 UTC
[Xapian-discuss] spliting words algorithm - indexer vs. queryparser
Hi, I haven't worked with Xapian for a long time! It works well on my old live project but now I have a new project and I want to update Xapian and the way I use it. We had this conversation some years ago: http://article.gmane.org/gmane.comp.search.xapian.general/2385 And I'd like to know if the current version of Xapian now has those features: 1) Being able to use the exact same algorithm to split words when adding a text to a document and when parsing a query (with the queryparser). 2) Is it possible to set the "content" (the postings) of a document by passing the whole text at once, without the need to split the words by ourself and adding each word one by one? That would be perfect for Xapian to use its internal words-spliting algorithm, the same that would after be used by the queryparser. Thanks in advance! Julien
Richard Boulton
2008-Dec-26 19:24 UTC
[Xapian-discuss] spliting words algorithm - indexer vs. queryparser
On Fri, Dec 26, 2008 at 10:10:04AM -0500, tata 668 wrote:> 1) Being able to use the exact same algorithm to split words when adding a text to a document and > when parsing a query (with the queryparser).Not quite the same algorithm (because you don't want to handle things like "AND" and "OR" and brackets in a query the same way as in a document), but the TermGenerator class does what you want. http://xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html> 2) Is it possible to set the "content" (the postings) of a document by passing the whole text at > once, without the need to split the words by ourself and adding each word one by one? That would be > perfect for Xapian to use its internal words-spliting algorithm, the same that would after be used > by the queryparser.That's what the term generator does for you. -- Richard
James Aylett
2008-Dec-29 11:58 UTC
[Xapian-discuss] Always returning ALL the documents matching a query
On Mon, Dec 29, 2008 at 11:58:03AM +0000, James Aylett wrote:> You can add terms to your Xapian database that represent the other > variables you want to restrict searches to. One common way of doing > this is to use omega-style prefixed terms > <http://xapian.org/docs/omega/termprefixes.html>, which is compatible > with the QueryParser and TermGenerator.For ranges (eg: date filters), check out <http://xapian.org/docs/valueranges.html>. J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org