code: func (ph *publishHandler) setMasterQuery(topNode blob.Ref) error {
  	query := &search.SearchQuery{
  		Sort:  search.CreatedDesc,
  		Limit: -1,
  		Constraint: &search.Constraint{
  			Permanode: &search.PermanodeConstraint{
  				Relation: &search.RelationConstraint{
  					Relation: "parent",
  					Any: &search.Constraint{
  						BlobRefPrefix: topNode.String(),
  					},
  				},
  			},
  		},
  		Describe: &search.DescribeRequest{
  			Depth: 1,
  			Rules: []*search.DescribeRule{
  				{Attrs: []string{"camliContent", "camliContentImage", "camliMember", "camliPath:*"}},
  			},
  		},
  	}
  	data, err := json.Marshal(query)
  	if err != nil {
  		return err
  	}
  	// TODO(mpl): we should use app.Client instead, but a *client.Client
  	// Post method doesn't let us get the body.
  	req, err := http.NewRequest("POST", ph.masterQueryURL, bytes.NewReader(data))
  	if err != nil {
  		return err
  	}
  	if err := addAuth(req); err != nil {
  		return err
  	}
  	resp, err := http.DefaultClient.Do(req)
  	if err != nil {
  		return err
  	}
  	defer resp.Body.Close()
  	body, err := ioutil.ReadAll(resp.Body)
  	if err != nil {
  		return err
  	}
  	if string(body) != "OK" {
  		return fmt.Errorf("error setting master query on app handler: %v", string(body))
  	}
  	return nil
  }
docs: // setMasterQuery registers with the app handler a master query that includes
  // topNode and all its descendants as the search response.