Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Question About The Configuration Format - I'D Like To Parse It Within My Python Code So I'Ll Be Able To Access Things Like


SuccessfulKoala55 this actually doesn't work

` apiserver_conf = ConfigFactory.parse_file(API_SERVER_CONF_PATH)

POINT 1

conf_content = HOCONConverter.to_hocon(config=ConfigFactory.from_dict(apiserver_conf.as_plain_ordered_dict()),
compact=False,
level=0, indent=2)

apiserver_conf['auth']['fixed_users']['users'].append(
ConfigFactory.from_dict({'username': username, 'password': password, 'name': name}))

POINT 2

new_conf_content = HOCONConverter.to_hocon(config=ConfigFactory.from_dict(apiserver_conf.as_plain_ordered_dict()),
compact=False,
level=0, indent=2) Strangely enough running this code results in new_conf_content == conf_content to be True . Seems like through this ConfigTree ` object I can't really apply changes on the configuration file

  
  
Posted 3 years ago
107 Views
0 Answers
3 years ago
one year ago