use of org.neo4j.kernel.impl.api.index.sampling.NonUniqueIndexSampler in project neo4j by neo4j.
the class NonUniqueDatabaseIndexPopulatingUpdaterTest method removedNodePropertyIncludedInSample.
@Test
public void removedNodePropertyIncludedInSample() throws Exception {
NonUniqueIndexSampler sampler = newSampler();
NonUniqueLuceneIndexPopulatingUpdater updater = newUpdater(sampler);
updater.process(add(1, SCHEMA_DESCRIPTOR, "foo"));
updater.process(add(2, SCHEMA_DESCRIPTOR, "bar"));
updater.process(add(3, SCHEMA_DESCRIPTOR, "baz"));
updater.process(add(4, SCHEMA_DESCRIPTOR, "qux"));
updater.process(remove(1, SCHEMA_DESCRIPTOR, "foo"));
updater.process(remove(2, SCHEMA_DESCRIPTOR, "bar"));
updater.process(remove(4, SCHEMA_DESCRIPTOR, "qux"));
verifySamplingResult(sampler, 1, 1, 1);
}
use of org.neo4j.kernel.impl.api.index.sampling.NonUniqueIndexSampler in project neo4j by neo4j.
the class NonUniqueDatabaseIndexPopulatingUpdaterTest method addedNodeCompositePropertiesIncludedInSample.
@Test
public void addedNodeCompositePropertiesIncludedInSample() throws Exception {
NonUniqueIndexSampler sampler = newSampler();
NonUniqueLuceneIndexPopulatingUpdater updater = newUpdater(sampler);
updater.process(add(1, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "foo"));
updater.process(add(2, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "bar"));
updater.process(add(3, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "baz"));
updater.process(add(4, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "bar"));
verifySamplingResult(sampler, 4, 3, 4);
}
use of org.neo4j.kernel.impl.api.index.sampling.NonUniqueIndexSampler in project neo4j by neo4j.
the class NonUniqueDatabaseIndexPopulatingUpdaterTest method removedNodeCompositePropertyIncludedInSample.
@Test
public void removedNodeCompositePropertyIncludedInSample() throws Exception {
NonUniqueIndexSampler sampler = newSampler();
NonUniqueLuceneIndexPopulatingUpdater updater = newUpdater(sampler);
updater.process(add(1, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "foo"));
updater.process(add(2, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "bar"));
updater.process(add(3, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "baz"));
updater.process(add(4, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "qux"));
updater.process(remove(1, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "foo"));
updater.process(remove(2, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "bar"));
updater.process(remove(4, COMPOSITE_SCHEMA_DESCRIPTOR, "bit", "qux"));
verifySamplingResult(sampler, 1, 1, 1);
}
use of org.neo4j.kernel.impl.api.index.sampling.NonUniqueIndexSampler in project neo4j by neo4j.
the class NonUniqueDatabaseIndexPopulatingUpdaterTest method nodePropertyUpdatesIncludedInSample.
@Test
public void nodePropertyUpdatesIncludedInSample() throws Exception {
NonUniqueIndexSampler sampler = newSampler();
NonUniqueLuceneIndexPopulatingUpdater updater = newUpdater(sampler);
updater.process(add(1, SCHEMA_DESCRIPTOR, "foo"));
updater.process(change(1, SCHEMA_DESCRIPTOR, "foo", "newFoo1"));
updater.process(add(2, SCHEMA_DESCRIPTOR, "bar"));
updater.process(remove(2, SCHEMA_DESCRIPTOR, "bar"));
updater.process(change(1, SCHEMA_DESCRIPTOR, "newFoo1", "newFoo2"));
updater.process(add(42, SCHEMA_DESCRIPTOR, "qux"));
updater.process(add(3, SCHEMA_DESCRIPTOR, "bar"));
updater.process(add(4, SCHEMA_DESCRIPTOR, "baz"));
updater.process(add(5, SCHEMA_DESCRIPTOR, "bar"));
updater.process(remove(42, SCHEMA_DESCRIPTOR, "qux"));
verifySamplingResult(sampler, 4, 3, 4);
}
Aggregations