On Sat, Feb 21, 2009 at 3:01 PM, Fard <[email protected]> wrote: > I am using Jackrabbit to manage my repository. I would like to search > through data there but I don't know what is the policy of jackrabbit for > searching. I mean, "query string" is searched through indexes or it is > searched through data. > The second question I need to know: what is Jackrabbit policy for indexing > data? Does Jackrabbit perform indexing data automatically or it is > programmer duty to do that? and If it does indexing automatically when and > how Jackrabbit perform it.
Search is defined in the JCR 1.0 specification. Level 1 repositories must support XPath queries (section 6.6 [1]), SQL is part of the optional feature set (section 8.5 [2]). The scope is defined that only persisted (ie. saved) data is searched, see section 6.6.7 [3]. In Jackrabbit the search index is enabled in the repository.xml via the SearchIndex element [4], which is there by default. Jackrabbits implementation will take care of automatic indexing. [1] http://www.day.com/specs/jcr/1.0/6.6_Searching_Repository_Content.html [2] http://www.day.com/specs/jcr/1.0/8.5_Searching_Repository_Content_with_SQL.html [3] http://www.day.com/specs/jcr/1.0/6.6.7_Search_Scope.html [4] http://jackrabbit.apache.org/jackrabbit-configuration.html Regards, Alex -- Alexander Klimetschek [email protected]
