Details

      Description

      In order to customize the indexing of node(for instance: nt:resource), I have done follow instructions at http://docs.jboss.org/exojcr/1.12.10-GA/developer/en-US/html/ch-search-configuration.html#d0e1731

      I want JCR to index only the data of nt:resource node so the content of indexing-configuration.xml is:

      <?xml version="1.0"?>
      <!DOCTYPE configuration SYSTEM "http://www.exoplatform.org/dtd/indexing-configuration-1.0.dtd">
      <configuration xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
        <index-rule nodeType="nt:resource">
             <property>jcr:data</property>
          </index-rule>
      </configuration>
      

      My configuration works properly:

      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl init
      FINE: Found rule 'org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl$IndexingRule@1daf238' for NodeType 'org.exoplatform.services.jcr.datamodel.InternalQName@362ea004 (http://www.jcp.org/jcr/nt/1.0resource)'
      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl init
      FINE: Registering it for name 'org.exoplatform.services.jcr.datamodel.InternalQName@c1ab9311 (http://www.exoplatform.com/jcr/exo/1.0faqResource)'
      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl init
      FINE: Registering it for name 'org.exoplatform.services.jcr.datamodel.InternalQName@362ea004 (http://www.jcp.org/jcr/nt/1.0resource)'
      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl init
      FINE: Registering it for name 'org.exoplatform.services.jcr.datamodel.InternalQName@be870772 (http://www.exoplatform.com/jcr/exo/1.0groovyResourceContainer)'
      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.IndexingConfigurationImpl init
      FINE: Registering it for name 'org.exoplatform.services.jcr.datamodel.InternalQName@df4a5a1c (http://www.exoplatform.com/jcr/exo/1.0forumResource)'
      Dec 8, 2011 4:36:22 PM org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex doInit
      INFO: Index initialized: /home/hieu_lai/java/exo-working/tomcat/bin/../gatein/data/jcr/lucene/knowledge_ksdemo Version: 4

      But when I perform search action, I receive jcr:encoding and jcr:mimeType of nt:resource.
      To predict the problem, I debugged the search process in depth and I found something wrong in
      org.exoplatform.services.jcr.impl.core.query.lucene.LuceneQueryBuilder

      450 QueryParser parser = new JcrQueryParser(fieldname, analyzer, synonymProvider);
      451 Query context = parser.parse(node.getQuery());
      

      Actually, the analyzer stores the customized index configurations but seems not used in Parsing query process, context which is used to visit node later doesn't have any information about it.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                nzamosenchuk Nikolazy Zamosenchuk
                Reporter:
                hieulaitrung Hieu Lai Trung
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days
                  3d
                  Remaining:
                  Time Spent - 4 hours Remaining Estimate - 2 days, 4 hours
                  2d 4h
                  Logged:
                  Time Spent - 4 hours Remaining Estimate - 2 days, 4 hours
                  4h