On 3/19/07, Marcel Reutegger <[EMAIL PROTECTED]> wrote:
alartin wrote:
> What can I do if I need some search engine like search functions rather
> than XPath or SQLs? For example, I store some information in nodes, say one
> webpage content per node and I want to find "similar pages" according to
> their cotents. This is a simple task when I use lucene directly. But what
> can I do if I use jackrabbit as underlying layer?
well, not much, because the API you are using is JCR and not lucene. but see
also below.
> And what can I do if I need some short description of the hit and
> highlight the query terms??
you have to create that manually.
> It seems Lucene is only used as a search library to implement the JCR
> sepecification, doesn't it?
that's correct.
> Is it possible to manipulate Lucene directly?
no.
But here's what you can do: create jira issues and describe exactly what you
would like to see as an enhancement. also try to think about how to integrate
this into jackrabbit or the query languages without affecting JCR compliance.
e.g. I could imagine a pseudo property or function in XPath: jr:highlight()
which returns an xml snippet with text extracts and highlighted search terms.
regards
marcel
Thanks for the answer Marcel. At the first glance it looks like what
you are saying is that this cannot be done through JCR API, which is
something I already was aware of. What I am really wondering is if
there is any way I can put my hands on the Lucene classes so that I
can use those for querying the indexing (so not JCR API, but rather a
"hack").
./alex
--
.w( the_mindstorm )p.