1. 14 May, 2002 8 commits
    • Fred Drake's avatar
    • Fred Drake's avatar
      5069d2f2
    • Guido van Rossum's avatar
      Fix _union() -- it wasn't getting what it expected from pop_smallest() · ca38cb41
      Guido van Rossum authored
      inside the while loop either.
      ca38cb41
    • Fred Drake's avatar
    • matt@zope.com's avatar
      Add double end tag to test cdata ignore · faa28298
      matt@zope.com authored
      faa28298
    • Guido van Rossum's avatar
      There's no point in encoding the number of continuation bytes in the · 5ee2de80
      Guido van Rossum authored
      first byte -- we always find the end of a particular encoded number by
      searching for the next byte with the high bit set.  This simplifies
      the encoding and gives us more space for small encodings: 128 values
      can now be encoded in 1 byte, and 16K in 2 bytes.
      5ee2de80
    • Guido van Rossum's avatar
      Merged TextIndexDS9-branch into trunk. · 61e89f2f
      Guido van Rossum authored
      61e89f2f
    • Jeremy Hylton's avatar
      Many small cleanups and simplifications. · a340cb9d
      Jeremy Hylton authored
      _indexedSearch():
      
          Simplify logic that called _apply_index() for each index in the
          catalog.  The if statement under the comment "Optimization" had
          identical code on either branch.  Perhaps the odd indentation made
          this confusing.  Regardless, remove the conditional.
      
          Change computation of normalized scores to multiply first, then
          divide.  Use literal 100. to make sure mult and div are floating
          point ops.
      
      searchResults():
      
          Simplify logic at beginning of searchResults().  The first two
          conditionals depended on kw, so organize the logic to make that
          clearer.
      
          Write helper method to find "sort-on" and "sort-index" instead of
          duplicating code in searchResults().
      
          For case were results are sorted, simplify construction of the
          final LazyCat and make it more efficient to boot.  Instead of use
          a list comprehension and a reduce + lambda to construct list and
          length of contained lists, do it with one explicit for loop that
          constructs both values.
      
              Note: I did detailed timing stats on three ways to compute the
              length of a sequence of sequences.  reduce + lambda was the
              slowest.  For short lists, an explicit for loop is fastest.
              For long lists, reduce(operater.add, map(len, list)) is
              fastest.  The explicit for loop is big win here, because we've
              got to walk over the elements anyway to undo the Schwarzian
              transform.
      
      Sundry:
      
      Use getattr() with default value of None in preference to hasattr()
      followed by getattr().  This gets the same result with half the work.
      
      Changes for consistent and frequent use of whitespace.
      
      Use types.StringType and isinstance() to test for strings.
      a340cb9d
  2. 13 May, 2002 1 commit
  3. 10 May, 2002 3 commits
  4. 09 May, 2002 2 commits
  5. 07 May, 2002 5 commits
  6. 06 May, 2002 1 commit
  7. 03 May, 2002 2 commits
    • Andreas Jung's avatar
      Eased the query optimization introduced with Zope 2.4.X · bbddef1c
      Andreas Jung authored
      (revision 1.72 or Catalog.py).
      
      TTW searches are no longer optimized to restore the old
      behaviour (user does not fill out any form fields ->
      return all hits)
      
      For application related searches we keep the optimization
      but it is possible to disable optimization by passing
      'optimize=0' as additional parameters to searchResults().
      bbddef1c
    • Andreas Jung's avatar
      fixed typo · e9c8fea9
      Andreas Jung authored
      e9c8fea9
  8. 30 Apr, 2002 3 commits
    • Jeremy Hylton's avatar
      Reformat text. · 94236806
      Jeremy Hylton authored
      94236806
    • Jeremy Hylton's avatar
      Reflow long line. · d5004255
      Jeremy Hylton authored
      d5004255
    • Jeremy Hylton's avatar
      A few small cleanups. · 22c494a0
      Jeremy Hylton authored
      Simplify initZopeSplitter() and remove unnecessary PyErr_Occurred().
      
      Use string macros for objects that are guaranteed to be strings.
      
      Remove unnecessary \ at end of line.
      
      In innermost loop of splitter function, replace ASSIGN() macro with
      Py_DECREF() and simple assignment.  The macro was doing more work
      than necessary because it called XDECREF on an object that was
      guaranteed not to be NULL.
      
      Use less horizontal whitespace in next_word().
      22c494a0
  9. 26 Apr, 2002 2 commits
  10. 25 Apr, 2002 9 commits
  11. 24 Apr, 2002 4 commits