BaseXdb/basex — Issue #310: Full-text index not applied when using language code
Author: dimitarp
Created: 2011-12-09 00:21:41+00:00
State: open

Create database with full-text index:

SET QUERYINFO true; SET FTINDEX true; SET LANGUAGE de; CREATE DB test test

Query which does not use index:

```xquery
//text()[. contains text 'test' using language 'de']
```
Output:

FTINDEX: ON
LANGUAGE: de
Database 'test' created in 9.16 ms.
QUERYINFO: ON
test

Query: //text()[. contains text 'test' using language 'de']

Compiling:
- optimizing descendant-or-self step(s)

Result: root()/descendant::text()[. contains text "test"]

Query which uses index:

```xquery
//text()[. contains text 'test' using language 'German']
```
Output:

FTINDEX: ON
LANGUAGE: de
Database 'test' created in 19.44 ms.
QUERYINFO: ON
test

Query: //text()[. contains text 'test' using language 'German']

Compiling:
- optimizing descendant-or-self step(s)
- applying full-text index

Result: db:fulltext("test", "test")