1

在 App Engine 中使用 bulkloader,内置索引太大(257 个实体的 6662 个索引),尽管属性没有被索引,如下所述。另外,我没有将属性从索引更改为未索引,

有没有办法减少索引大小?

<kind>
----
class Content(db.Model):
    index       = db.StringProperty()
    path        = db.StringProperty(indexed=False)
    law         = db.StringProperty(indexed=False)
    appno       = db.StringProperty(indexed=False)
    page        = db.IntegerProperty(indexed=False) 
    applicant   = db.StringProperty(multiline=True,indexed=False)
    title       = db.StringProperty(indexed=False)
    ipc         = db.StringProperty(multiline=True,indexed=False)
    division    = db.StringProperty(indexed=False)
    examination = db.StringProperty(indexed=False)
    date        = db.DateTimeProperty(auto_now_add=True,indexed=False)
----
<bulkloader.yaml>
transformers:
- kind: Content
  connector: csv
  property_map:
    - property: __key__
      external_name: key
      export_transform: transform.key_id_or_name_as_string

    - property: index 
      external_name: index 
      # Type: String Stats: 12 properties of this type in this kind.

    - property: path 
      external_name: path 
      # Type: String Stats: 12 properties of this type in this kind.
      .....
    - property: date
      external_name: date
      # Type: Date/Time Stats: 12 properties of this type in this kind.
      import_transform: transform.import_date_time('%Y-%m-%dT%H:%M:%S')
      export_transform: transform.export_date_time('%Y-%m-%dT%H:%M:%S')

 ----
 <Command>
 /appcfg.py upload_data --config_file=bulkloader.yaml --filename=foo.csv --kind=Content --url=​http://bar.appspot.com/_ah/remote_api

 ----
4

0 回答 0