code: def test_pages_with_filter():
      from whoosh.scoring import Frequency
  
      schema = fields.Schema(
          id=fields.ID(stored=True), type=fields.TEXT(), c=fields.TEXT
      )
      ix = RamStorage().create_index(schema)
  
      w = ix.writer()
      w.add_document(
          id=u("1"), type=u("odd"), c=u("alfa alfa alfa alfa alfa alfa")
      )
      w.add_document(
          id=u("2"), type=u("even"), c=u("alfa alfa alfa alfa alfa")
      )
      w.add_document(
          id=u("3"), type=u("odd"), c=u("alfa alfa alfa alfa")
      )
      w.add_document(id=u("4"), type=u("even"), c=u("alfa alfa alfa"))
      w.add_document(id=u("5"), type=u("odd"), c=u("alfa alfa"))
      w.add_document(id=u("6"), type=u("even"), c=u("alfa"))
      w.commit()
  
      with ix.searcher(weighting=Frequency) as s:
          q = query.Term("c", u("alfa"))
          filterq = query.Term("type", u("even"))
          r = s.search(q, filter=filterq)
          assert [d["id"] for d in r] == ["2", "4", "6"]
          r = s.search_page(q, 2, pagelen=2, filter=filterq)
          assert [d["id"] for d in r] == ["6"]
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, formats, highlight, qparser, query
  from whoosh.codec.whoosh3 import W3Codec
  from whoosh.compat import u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage, TempIndex
label_desc: Use image node_id 10 for calling a global function with example usage: test_pages_with_filter() without return types