Dear Oak Community,
we are trying to enable a fulltext index for a few properties, but it doesn't
find the correct results. We are using OAK 1.6.20
First of all, the index looks like this:
/oak:index/lucene
- compatVersion = 2
- async = "async"
- jcr:primaryType = oak:QueryIndexDefinition
- evaluatePathRestrictions = true
- type = "lucene"
+ indexRules
+ mix:node
+ properties
+ primaryType
- name = "jcr:primaryType"
- propertyIndex = true
+ mix:contentAttribute
+ properties
+ richDescription
- name = "richDescription"
- analyzed = true
+ primaryType
- name = "jcr:primaryType"
- propertyIndex = true
+ mix:content
+ properties
+ articleNumber
- name = "articleNumber"
- analyzed = true
+ primaryType
- name = "jcr:primaryType"
- propertyIndex = true
+ description
- name = "jcr:description"
- analyzed = true
+ title
- name = "jcr:title"
- analyzed = true
+ uuid
- name = "jcr:uuid"
- propertyIndex = true
- notNullCheckEnabled = true
+ tags
- name = "tags"
- analyzed = true
The query looks like this:
SELECT node.* FROM [mix:node] AS node INNER JOIN [mix:content] AS content ON
node.[content] = content.[jcr:uuid] INNER JOIN [mix:contentAttribute] AS
attribute ON ISCHILDNODE(attribute, content) WHERE
ISDESCENDANTNODE(node, '/collections') AND
(
CONTAINS(content.[jcr:title],'Lorem') OR
CONTAINS(content.[jcr:description],'Lorem') OR
CONTAINS(attribute.[richDescription],'Lorem') OR
CONTAINS(content.[tags],'Lorem') OR
CONTAINS(content.[articleNumber],'Lorem')
)
AND NOT node.deleted = CAST('true' AS BOOLEAN)
>From the repository configuration I can read this:
query.full.text.search.supported: false
and I don't know how to get rid of it.
After many tests we got the index running (it indexes something and we see logs
for e.g. reindexing and no warnings, no errors while creating the repository,
these look fine).
My query also returns results, but they have nothing to do with the values I
added in the query. It looks like I get back everything which got indexed. At
least I can say, I receive always the same results, regardless of the search
term.
When I set
QueryEngineSettings queryEngineSettings = new QueryEngineSettings();
queryEngineSettings.setFullTextComparisonWithoutIndex(true);
oak.with(queryEngineSettings);
and delete the fulltext index, I get correct search results, but it's not quite
fast. But it should prof at least that the query is correct.
What can we do here to fix or inspect it? I ran out of ideas how to handle
these false results when using the index. If you need additional information to
help, please ask for it, I will try to provide what is needed.
Mit freundlichen Grüßen / Kind regards
Philipp Koetz