[ 
https://issues.apache.org/jira/browse/OAK-8971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469287#comment-17469287
 ] 

Thomas Mueller commented on OAK-8971:
-------------------------------------

I'm sorry actually the query would be:
{noformat}
SELECT * FROM [nt:base] AS s 
WHERE ISDESCENDANTNODE([/content/my-site/en]) 
and contains(s.*, 'company') 
and s.* like '%\%\%company\%\%%'
{noformat}

(you do need the wildcard before and after the '%%' characters).

Yes this works for me. However, there is no good way to control which 
properties it should match: it would try to match all properties, including 
binaries, and that would fail unfortunately with a very strange error message 
"String is too long".

So you would need to restrict the properties, e.g.:
{noformat}
SELECT * FROM [nt:base] AS s 
WHERE ISDESCENDANTNODE([/content/my-site/en]) 
and contains(s.*, 'company') 
and (s.[jcr:title] like '%\%\%company\%\%%'
or s.[component] like '%\%\%company\%\%%'
or ...
)
{noformat}

It's not really faster than if you just execute the following, and then filter 
on the client side:

{noformat}
SELECT * FROM [nt:base] AS s 
WHERE ISDESCENDANTNODE([/content/my-site/en]) 
and contains(s.*, 'company')
{noformat}

Combined with valueRegex this should be fine however, I believe.

> Indexing: dynamic boost, as an alternative to IndexFieldProvider
> ----------------------------------------------------------------
>
>                 Key: OAK-8971
>                 URL: https://issues.apache.org/jira/browse/OAK-8971
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: indexing
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>             Fix For: 1.30.0
>
>         Attachments: OAK-8971.patch
>
>
> The org.apache.jackrabbit.oak.plugins.index.lucene.spi.IndexFieldProvider is 
> a callback that allows to change the behavior of indexing. There are multiple 
> problems:
> * (1) Not available using oak-run
> * (2) Only available for Lucene indexes
> Instead of a callback, a configuration option in the index property should be 
> added, such that the most commonly used features are available in oak-run, 
> and can be implemented in other indexes (e.g. Elastisearch, Solr).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to