]> gerrit.simantics Code Review - simantics/platform.git/commit
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)
commita8ea477a16e16f53f2909c58fb88a379b36b3f2c
tree93ff479b4617e1b0c11ef8c63789155fe3ce518b
parentc10753c13921e63c6bb2cf51335a9c6d402efac5
Added new field TypeId to dependency index for exact type searching

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
14 files changed:
bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexUtils.java
bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsMemorySearcher.java
bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java
bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/Queries.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/EntityInstances.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/Dependencies.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/Entry.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/IndexQueries.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/IndexedInstances.java
bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/SearchResourceDialog.java
bundles/org.simantics.modeling/src/org/simantics/modeling/adapters/ExistingInstancesRemover.java
bundles/org.simantics.modeling/src/org/simantics/modeling/adapters/Removers.java
bundles/org.simantics.structural.synchronization.client/src/org/simantics/structural/synchronization/Synchronizer.java