Search.index.properties.excluded causes Duplicate key exception

(Evaluating Stardog server 7.6.0)

I'm trying to use the property exclusion feature of full text search, but when I attempt to create a database as follows:

docker run -it --rm --network host --entrypoint /opt/stardog/bin/stardog-admin "stardog/stardog" \
	db create -n mydb -o \
		search.enabled=true \
		search.index.properties.excluded=http://xmlns.com/foaf/0.1/name,http://xmlns.com/foaf/0.1/nick \
	--

I get an exception:

INFO  2021-03-17 23:16:34,799 [stardog-user-2] com.complexible.stardog.StardogKernel:write(77): Successfully created database 'mydb'.
INFO  2021-03-17 23:16:35,063 [stardog-user-2] com.complexible.stardog.docs.db.BitesConnectableFactory:createDocumentStore(133): Creating document store for mydb at file:////var/opt/stardog/mydb/docs
ERROR 2021-03-17 23:16:35,308 [stardog-user-2] com.complexible.stardog.action.CreateDatabaseKernelAction:execute(303): Unable to initialize Database 'mydb', Database will be set to the offline state
com.complexible.stardog.db.DatabaseException: java.lang.IllegalStateException: Duplicate key http://xmlns.com/foaf/0.1/name
	at com.complexible.stardog.db.DatabaseImpl.initializeConnectables(DatabaseImpl.java:602) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.db.DatabaseImpl.initializeConnectables(DatabaseImpl.java:587) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.db.DatabaseImpl.initialize(DatabaseImpl.java:666) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.action.CreateDatabaseKernelAction.execute(CreateDatabaseKernelAction.java:298) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.StardogKernel.createDatabase(StardogKernel.java:1290) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.StardogKernel.createDatabase(StardogKernel.java:1400) ~[stardog-7.6.0.jar:?]
	at com.complexible.stardog.protocols.http.server.AdminDatabaseService.createNewDatabase(AdminDatabaseService.java:788) ~[stardog-protocols-http-server-7.6.0.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.6.0.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.7.1.jar:1.7.1]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.7.1.jar:1.7.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: com.complexible.stardog.db.ConnectableException: java.lang.IllegalStateException: Duplicate key http://xmlns.com/foaf/0.1/name
	at com.complexible.stardog.search.db.ConnectableSearchIndex.initialize(ConnectableSearchIndex.java:162) ~[stardog-search-waldo-7.6.0.jar:?]
	at com.complexible.common.base.Streams.lambda$uncheckedConsumer$7(Streams.java:213) ~[stardog-utils-common-7.6.0.jar:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_282]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:1.8.0_282]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:1.8.0_282]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_282]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650) ~[?:1.8.0_282]
	at com.complexible.stardog.db.DatabaseImpl.initializeConnectables(DatabaseImpl.java:595) ~[stardog-7.6.0.jar:?]
	... 12 more
Caused by: java.lang.IllegalStateException: Duplicate key http://xmlns.com/foaf/0.1/name
	at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133) ~[?:1.8.0_282]
	at java.util.HashMap.merge(HashMap.java:1254) ~[?:1.8.0_282]
	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320) ~[?:1.8.0_282]
	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:1.8.0_282]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_282]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_282]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_282]
	at com.complexible.stardog.search.waldo.DefaultIndexer.create(DefaultIndexer.java:150) ~[stardog-search-waldo-7.6.0.jar:?]
	at com.complexible.stardog.search.IndexingUtils.indexAll(IndexingUtils.java:64) ~[stardog-search-waldo-7.6.0.jar:?]
	at com.complexible.stardog.search.db.ConnectableSearchIndex.initialize(ConnectableSearchIndex.java:131) ~[stardog-search-waldo-7.6.0.jar:?]
	at com.complexible.common.base.Streams.lambda$uncheckedConsumer$7(Streams.java:213) ~[stardog-utils-common-7.6.0.jar:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_282]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:1.8.0_282]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401) ~[?:1.8.0_282]
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:1.8.0_282]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:1.8.0_282]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:1.8.0_282]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_282]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650) ~[?:1.8.0_282]
	at com.complexible.stardog.db.DatabaseImpl.initializeConnectables(DatabaseImpl.java:595) ~[stardog-7.6.0.jar:?]
	... 12 more

.. and the database is subsequently offline and not usable. From the metadata it would appear that the multiple value is OK. Am I doing something wrong or is this a bug?

stardog-admin metadata get -o search.index.properties.excluded mydb
+----------------------------------+----------------------------------------------------------------+
|              Option              |                             Value                              |
+----------------------------------+----------------------------------------------------------------+
| search.index.properties.excluded | http://xmlns.com/foaf/0.1/name, http://xmlns.com/foaf/0.1/nick |
+----------------------------------+----------------------------------------------------------------+

Note: It works fine if I only specify a single property to exclude, but multiple cause the above exception.

I haven't checked every detail but the exception is unhelpful nonetheless. It looks like it should work. Can you share the entire stack from the log (avoid "snipping" it), or the entire log file?

Thanks for the quick reply - I've updated the original post with the full trace the log provides.

Hi,
Any news on this one (or more information required)?
Alternatively: Is it possible to instead configure an inclusion list of properties?

Regards,
VT

Hi Vilnis,

I have been on leave for a week, I will inspect and respond immediately. Thank you for your patience and understanding.

Best regards,

Canberk

Hi Vilnis,

This one was a bug and it is fixed now. That will be reflected in next release. Thank you for reporting it!

For the question of configuring also an inclusion list, it is already in our request list to be evaluated.

Best regards,

Canberk

Hi Canberk,

Thank you for the update and quick turn-around.

Regards,
Vilnis