| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]
Search

# Method Search.do_query_and()

Method do_query_and

  `ResultSet do_query_and(array(string) words, array(int) field_coefficients, array(int) proximity_coefficients, int cutoff, function(string:string) blobfeeder)`

Parameter `words`

  Arrays of word ids. Note that the order is significant for the ranking.

Parameter `field_coefficients`

  An array of ranking coefficients for the different fields. In the range of [0x0000-0xffff]. The array (always) has 65 elements:

  Array
  `int 0` | body
  `int 1..64` | Special field 0..63.

Parameter `proximity_coefficients`

  An array of ranking coefficients for the different proximity categories. Always has 8 elements, in the range of [0x0000-0xffff].

  Array
  `int 0` | spread: 0 (Perfect hit)
  `int 1` | spread: 1-5
  `int 2` | spread: 6-10
  `int 3` | spread: 11-20
  `int 4` | spread: 21-40
  `int 5` | spread: 41-80
  `int 6` | spread: 81-160
  `int 7` | spread: 161-

Parameter `blobfeeder`

  This function returns a Pike string containing the word hits for a certain word. Call repeatedly until it returns `0`.