jina.types.sets.querylang

class jina.types.sets.querylang.QueryLangSet(querylang_protos)[source]

Bases: collections.abc.MutableSequence

QueryLangSet is a mutable sequence of QueryLang. It gives an efficient view of a list of Document. One can iterate over it like a generator but ALSO modify it, count it, get item.

Parameters

querylang_protos (RepeatedCompositeContainer) – A list of QueryLangProto

Set constructor method.

insert(index, ql)[source]

Insert :param:`ql` at :param:`index` into _querylangs_proto.

Return type

None

append(value)[source]

Append :param:`value` in _querylangs_proto.

extend(iterable)[source]

Extend an iterable to :class:QueryLangSet.

Return type

None

clear()[source]

Clear _querylangs_proto set.

reverse()[source]

Reverse order of _querylangs_proto set.

build()[source]

Build a name to QueryLang mapping so one can later index a QueryLang using name as string key.