- assigned_to: nobody --> mochoa
hi marcelo, pedro, i wonder iff this is expected behaviour because i just only added an OR term relationship to the where clause nearby lcontains and the engine complains about problems with lscore.
drop index it1 force;
create index it1 on t1(f3) indextype is lucene.LuceneIndex parameters(
\'Analyzer:org.apache.lucene.analysis.standard.StandardAnalyzer;ExtraCols:f2 \"f2\"\');
SQL> select f1, to_char(f2), f3, lscore(1) from t1 where lcontains(f3, \'101\', 1) > 0 or f3 = \'101\';
select f1, to_char(f2), f3, lscore(1) from t1 where lcontains(f3, \'101\', 1) > 0 or f3 = \'101\'
*
FEHLER in Zeile 1:
ORA-29532: Java-Aufruf durch nicht abgefangene Java-Exception beendet:
java.sql.SQLException: Can not use lscore() without lcontains() in a where side
ORA-06512: in \"LUCENE.LUCENEDOMAININDEX\", Zeile 43
ORA-06512: in \"LUCENE.LUCENEDOMAININDEX\", Zeile 39
interestingly, adding an AND term does not produce the error:
<LUCENE_T@nlz_hugonlz_ch_mtr_neu> select f1, to_char(f2), f3, lscore(1) from t1 where lcontains(f3, \'101\', 1) > 0 and f3 = \'101\';
F1
----------
TO_CHAR(F2)
----------
F3 | LSCORE(1)
---|----------
1
ravi
101| 1
removing lscore from the select at all does work:
<LUCENE_T@nlz_hugonlz_ch_mtr_neu> select f1, to_char(f2), f3 from t1 where lcontains(f3, \'101\') > 0 or f3 = \'101\';
F1
----------
TO_CHAR(F2)
----------
F3
---
1
ravi
101