]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added new field TypeId to dependency index for exact type searching 57/3757/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 3 Jan 2020 11:51:33 +0000 (13:51 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 10 Jan 2020 11:11:40 +0000 (11:11 +0000)
The new field is String-valued and contains a concatenation of the
resource ids of a resource's type hierarchy, separated by a whitespace,
for example `41233 12423 1233`. This field uses the WhitespaceAnalyzer,
i.e. its contents are tokenized by whitespace and thus searches like
`TypeId:41233` will return exactly those resources that are instances of
the type resource `41233`.

This commit also simplifies and fixes some of the existing index
searching code to use this new field instead of the old `Types` field
for type-based searching.

If existing product-code uses the indexing facilities directly and not
through `QueryIndexUtils` or `Instances`, such code will also require
changes to take this new field into use.

See `IndexQueries` to form queries related to this field.

gitlab #438

Change-Id: If968669babebd29e6f4789e10c118a999e6197e3


No differences found