cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene search and stop word on properties

chapeaurouge
Champ in-the-making
Champ in-the-making
Hello all,

I have a custom model, which contains a "business_area" property. One of the value of that property is "IT".
If I do a search on "IT", I get no result. Doing search on all other values (ie, HR, EDP, etc…) works fine.

Is it that lucene considers it as a stop word?

Thank you.
fred
4 REPLIES 4

alex54
Champ on-the-rise
Champ on-the-rise
Hi,

I found the exactly the same problem 2 month ago.
'IT' is a stop word, that's why your search return nothing

Two solutions:
- write your own engine by specifying custom stop words
- Specify a custom indexation type (without tokenised words) for this metadata in the Model (I choosed this solution)

==> In your custom model (XML file)



<aspect name="foo:bar">
         <title>A custom folder aspect</title>        
          <properties>
            <property name="foo:aProperty">
              <title>aaaaa</title>
              <type>d:text</type>
              <mandatory>false</mandatory>
              [b]<!– index in one word –>
              <index enabled="true">
                 <atomic>true</atomic>
                 <stored>true</stored>
                 <tokenised>false</tokenised>
              </index>[/b]
            </property>






If you have data in you repository (in your PRODUCTION environement for instance), I think you need to launch a full re-indexation to take this configuration into account for old data…  Smiley Wink

bye.
Alex - A french user

chapeaurouge
Champ in-the-making
Champ in-the-making
OK, that's what I thought.

Thanks for your input, very helpful.

fred - another french user Smiley Wink

chapeaurouge
Champ in-the-making
Champ in-the-making
Works perfect, thanks Smiley Wink

alex54
Champ on-the-rise
Champ on-the-rise
Avec plaisir  :mrgreen: