[Xapian-tickets] [Xapian] #387: Optimisation for a filter term matching all documents

Xapian nobody at xapian.org
Fri Jul 3 15:31:21 BST 2009


#387: Optimisation for a filter term matching all documents
-------------------------+--------------------------------------------------
 Reporter:  olly         |       Owner:  olly
     Type:  enhancement  |      Status:  new 
 Priority:  normal       |   Milestone:      
Component:  Matcher      |     Version:      
 Severity:  normal       |    Keywords:      
Blockedby:               |    Platform:  All 
 Blocking:               |  
-------------------------+--------------------------------------------------

Comment(by richard):

 Do we really want to encourage users to store terms in their database
 specially for this purpose that match all the documents?  Wouldn't a
 better approach for the situation you suggest be to have a way to generate
 a query from a database which matches all documents in that database.  ie,
 in python, something like:

 {{{
  import xapian
  db1 = xapian.Database('db1')
  db2 = xapian.Database('db2')
  db = Database()
  db.add_database(db1)
  db.add_database(db2)

  q = Query('foo')

  # To restrict to db1
  filter = Query(db1)
  q = Query(xapian.OP_FILTER, q, filter)
 }}}

 This wouldn't be accessible from the query string without adding explicit
 support for the queryparser, but seems a nicer solution than encouraging
 storing of lots of data which isn't ever actually going to be read.  Even
 if it's well compressible data, adding it is going to add an overhead at
 indexing time.

 That said, this optimisation still seems worthwhile, and should be easy
 and non-invasive to do.

-- 
Ticket URL: <http://trac.xapian.org/ticket/387#comment:1>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list