jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Controlling Indexing.
Date Thu, 21 Oct 2010 09:24:18 GMT
Hi,

I have a query that uses jcr:contains(.,'admin') matches all nodes where jcr:createdBy = admin.
Because of the requirements we have jcr:createBy=admin happens quite a lot and is not a meaningful
search field, certainly not as a tokenized search field to be matched by jcr:contains. So
I have configured the indexing_configuration with 

<!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.2.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
               xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
               xmlns:sakai="http://www.sakaiproject.org/nakamura/2.0">
  <index-rule nodeType="nt:unstructured" >
    <property boost="0.0" nodeScopeIndex="false"  >jcr:createdBy</property>
  </index-rule>
</configuration>

However, when I do a search on other things, jcr:contains now doesn't match anything and when
I open the Lucene index in Luke I still see that the field 3:FULL:createdBy is in the index
with 1 value "admin",  and in _:FULLTEXT "admin" has the highest rank.  It looks to me like
I haven't got the indexing configuration right.

Is it possible to remove jcr:createdBy from the full text index so it doesn't match in jcr:contains,
and leave all all other fields (we don't have a full list of all possibilities) in the index
?

Can I do this for all nodes not just nt:unstructured, or do I need an entry for each nodeType
?

Is there a better way of doing this?

Thanks
Ian


Mime
View raw message