Thanks Alex,
I tried your steps, and did a simple query test but nothing comes back:
(this is a query I used before in jackrabbit 2.x without issue)
Node searchPathNode = session.getNode('/searchpath');
Node testNode = searchPathNode.add('testnode');
testNode.setProperty('someproperty','teststring');
session.save();
String statement = "select * from \"nt:unstructured\" as theNode where
ISDESCENDANTNODE('/searchpath') and contains(theNode.*,'teststring')";
Query queryToRun = queryManager.createQuery(statement, Query.JCR_SQL2);
QueryResult queryResult = queryToRun.execute();
System.out.println("num found is: " + queryResult.getNodes().getSize());
Also, I'm not sure I understand what you mean by a scheduler. My intention
is to run an oak instance as part of a WAR in Tomcat, where it can startup
Lucene, index changes as they come in, and shutdown when Tomcat shuts
down. This WAR would be part of a cluster, all connecting to a single
instance of MongoDB. Everything is working, except for search.
Thanks,
Adrien
On Mon, Oct 20, 2014 at 1:21 AM, Alex Parvulescu <[email protected]>
wrote:
> Hi Adrien,
>
> You need a few things to get the full-test index working:
>
> // (1)
> LuceneIndexProvider provider = new LuceneIndexProvider();
> oak.with((QueryIndexProvider) provider);
> oak.with((Observer) provider);
> // (2)
> oak.with(new LuceneIndexEditorProvider());
> // (3)
> oak.with(new LuceneInitializerHelper("lucene", (Set<String>)
> null));
> // (4)
> oak.withAsyncIndexing();
>
> (1) lucene query index and observer for the query parts, (2) lucene
> indexer, (3) index definition, (4) signal that you want to start the
> background index process.
>
> Also make sure you have a scheduler installed so that the background
> indexing thread can run.
>
> hope this helps,
> alex
>
>
>
> On Sun, Oct 19, 2014 at 9:01 PM, Adrien Lamoureux <
> [email protected]> wrote:
>
> > Hello,
> >
> >
> > I'm doing this without success:
> >
> > oak.with(new LuceneIndexEditorProvider());
> >
> > oak.with((QueryIndexProvider)new LuceneIndexProvider());
> >
> > what am I missing?
> >
> > I prefer to avoid repository.xml configuration, and OSGi configuration.
> >
> > Thanks,
> >
> > Adrien
> >
>