context with option STOPWORDS not working with 8.6

Wednesday, 8 February 2017 · 2 messages
PM
Patrice Drolet ift.a., MD8 Feb 2017 14:53 #
Hi, I have this java code that works well with 8.5 and gives an error with 8.6 (the code and the file stop_words.fr are in jars):
		URL urlStopWords = Thread.currentThread().getContextClassLoader().getResource(stopWords);
		if (urlStopWords!=null) {
			this.context.options.assign("STOPWORDS", urlStopWords.getFile());
		}

org.basex.core.BaseXException: /stop_words.fr
	at org.basex.core.Command.execute(Command.java:96)
	at org.basex.core.Command.execute(Command.java:118)
	at ca.infodata.syra.util.ValidRamq.createDb(ValidRamq.java:771)
Line 771 is: new CreateDB(dbname).execute(this.context); I took the lastest snapshot (Jan 30). Regards, Patrice Drolet
CG
Christian Grün8 Feb 2017 16:15 #
Hi Patrice, Thanks for the hint. If a stop word list is not found, BaseX 8.6 raises an exception (before 8.6, the error was ignored) [1,2]. If you would like to get your archived stopword list parsed correctly, you may need to provide us with a little self-contained example. Hope this helps, Christian [1] https://github.com/BaseXdb/basex/blob/eb600dda940fc0c86321323ca0ddf9a70ebbdca1/basex-core/src/main/java/org/basex/util/ft/StopWords.java#L65-L77 [2] https://github.com/BaseXdb/basex/blob/eb600dda940fc0c86321323ca0ddf9a70ebbdca1/basex-core/src/main/java/org/basex/util/ft/StopWords.java#L65-L77
Quoted text · MD · 27 lines
On Wed, Feb 8, 2017 at 1:52 PM, Patrice Drolet ift.a., MD <patrice.drolet at gmail.com> wrote: > Hi, > > I have this java code that works well with 8.5 and gives an error with 8.6 > (the code and the file stop_words.fr are in jars): > > URL urlStopWords = > Thread.currentThread().getContextClassLoader().getResource(stopWords); > if (urlStopWords!=null) { > this.context.options.assign("STOPWORDS", urlStopWords.getFile()); > } > > org.basex.core.BaseXException: /stop_words.fr > at org.basex.core.Command.execute(Command.java:96) > at org.basex.core.Command.execute(Command.java:118) > at ca.infodata.syra.util.ValidRamq.createDb(ValidRamq.java:771) > > Line 771 is: > new CreateDB(dbname).execute(this.context); > > > I took the lastest snapshot (Jan 30). > > Regards, > > Patrice Drolet

⚡Generated with XQuery