Hey Thomas, Thanks for the reply! How would I make sure the cost is always higher?
There is also second option that I was thinking about, correct me if I'm wrong please: - Create a new lucene property index that searches for a nonexisting property - Create an IndexFieldProvider class that parses out the %%sentence%% from a NodeState - Save the value in a field name only when the indexDefinition NodeState is the newly created lucene property index - Do a native query to this specific lucene index for the field name Would this work? Thanks, Roy > On 13 Jul 2018, at 12:28, Thomas Mueller <[email protected]> wrote: > > Hi, > > You could use a tag (see > http://jackrabbit.apache.org/oak/docs/query/query-engine.html#Query_Option_Index_Tag). > So: > > * add the second index with a higher cost than the original index (e.g. using > a high costPerExecution / costPerEntry) > * in this second index, set the tag "myindex" > * in the query, use "option(index tagged myindex)" > > That way, only your query will use that index, and the other queries will use > the (lower cost) default index. > > Regards, > Thomas > >
