cancel
Showing results for 
Search instead for 
Did you mean: 

Please help with Lucene Search...

gianluca
Champ in-the-making
Champ in-the-making
Hi All,

I have modified the contentModel.xml for adding two new properties:


      <type name="cm:content">
         <title>Content</title>
         <parent>cm:cmobject</parent>
         <archive>true</archive>
         <properties>
            <property name="cm:content">
               <type>d:content</type>
               <mandatory>false</mandatory>
               <!— Index content in the background –>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="cm:www">
              <title>www</title>
              <type>d:text</type>
              <protected>true</protected>
            </property>
            <property name="cm:yyy">
              <title>yyy</title>
              <type>d:text</type>
              <protected>true</protected>
            </property>
         </properties>
         <mandatory-aspects>
           <aspect>cm:versionable</aspect>
        </mandatory-aspects>
      </type>

but if I try to search with Lucene in this two new properties I have this problem: for the first (www) I find some result correctly, for the second (yyy) any result!
(I'm sure that the phrase I'm searching EXIST!!)

I use a search code as this:


TEXT:"aaa bbb" OR @cm\:www:"aaa bbb"

There is a limit for the number of indexed properties?

Many Thanks
3 REPLIES 3

andy
Champ on-the-rise
Champ on-the-rise
Hi

TEXT by default means - look in all attributes of type d:content.

It does not include d:text

1) Use the attribute     @cm\\:woof:"banana"

2) you can configure which attributes are used for TEXT (or ALL) on the serach parameters. The can be a mixture of text and content and could be d:text and d:content

3) Search all attributes by type     d\\:text:"woof" 

Andy

rogier_oudshoor
Champ in-the-making
Champ in-the-making
Howdy .. i'm running into similar issues, whereas i'd like my full-text search to pick up on certain d:text properties.

Andy, how exactly do i add my properties to the TEXT search? I looked through the search parameter class but couldn't find a method to add them ….

andy
Champ on-the-rise
Champ on-the-rise
Hi

Use SearchParameters and

  public void addTextAttribute(String attribute)

Add all the ones you want as fullt qualified fields (@+qname.toString()) - if unset it uses all content properties.

Andy