What I would like to see in BaseX, is that similar as in xquery, 'Stopwords' could be used as if it were a separate resource in the 'Incidents'-database and that it could be used as follows in the query:
That’s not supported by the spec (see [1] for all the details). You need to write your stop words to a local file (e.g. via file:write); after that, you can reference this file in your fulltext expression:
/books/book [@number="1"]//p contains text "propagation of errors" using stop words at "stopwords.txt"
However, the more common and more efficient approach is to supply a stop words file when creating the full-text index. This will reduce the size of your full-text index (which is the major advantage in practice). If you call ft:search or ...[text() contains text ...] later on, this stop words file will be used to filter out terms that occur in your search terms.
As far as I understand, 'stemming' has alrady been made available in the ft:module. Would it also be possible to use STOPWORDS in a similar way?
Which function would you like to see extended?
[1] https://www.w3.org/TR/xpath-full-text-10/#ftstopwordoption