cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene search exact property value is not getting

kranthi
Star Contributor
Star Contributor

In my data-List I configured multiple groups in properties

         

  •       IT
  •       IT1
  •       IT2

when I try to search the exact group with property like IT.Still it is showing all the 3 properties

I tried like this:

PATH:"//app:company_home/st:sites/cm:test//*" AND TYPE:"tst:departmentList"  =@tst\:deptName:"IT"

PATH:"//app:company_home/st:sites/cm:test//*" AND TYPE:"tst:departmentList"  @tst\:deptName:"IT"

In both cases I got the all 3 values.

6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator

Because you have not used an AND before the last condition, you are basically doing an OR query here (unless you have the default operator set to AND).

kranthi
Star Contributor
Star Contributor

Now I tried like that but there is no luck 

PATH:"//app:company_home/st:sites/cm:test//*" AND TYPE:"tst:departmentList"  AND =@tst\:deptName:"IT"

 

found 0 results for above query.

PATH:"//app:company_home/st:sites/cm:test//*" AND TYPE:"tst:departmentList"  AND @tst\:deptName:"IT"

 

In this case it shows all values starting with IT in that List Result I got for above query is : found 3 results... 

But we need to get only one values from there.

 

andy1
Star Collaborator
Star Collaborator

Hi

You need to make sure your property is set to support identifier based queries. How is this property defined? You need it to be tokenised "both" or "false" ....... not set to "true".

Andy

kranthi
Star Contributor
Star Contributor

I set this property inside the datalist.

I didn't get what your saying for this :You need to make sure your property is set to support identifier based queries

Please can you elaborate it. 

andy1
Star Collaborator
Star Collaborator

Hi


Please post your property definition so we can tell what you have done and suggest the fix.

Andy

kranthi
Star Contributor
Star Contributor

Hi Andy,

Please find 

<type name="tst:departmentList">
      <title>Department Groups List</title>
      <description>Department and it's groups</description>
      <parent>dl:dataListItem</parent>

<properties>
      <property name="tst:deptName">
            <title>Department Name</title>
             <type>d:text</type>
              <mandatory>true</mandatory>
      </property>
</properties>
<associations>
      <association name="tst:deptGroup" read-only="false">
               <title>Department Group</title>
               <source>
                     <mandatory>false</mandatory>
                     <many>true</many>
               </source>
            <target>
                    <class>cm:authorityContainer</class>
                     <mandatory>true</mandatory>
                     <many>false</many>
            </target>
</association>

</type>