cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced search on custom-properties

redbull
Champ in-the-making
Champ in-the-making
Hi,
I'm trying to use "advanced search" on some custom properties.
But when I use the plus operator "+" to find more values in the search results it doesn't work!

This is the web-client-config-custom.xml section:

<config evaluator="string-compare" condition="Advanced Search">
   <advanced-search>
      <custom-properties>
   <meta-data aspect="trv:docSearchable" property="trv:OfficeName" display-label="Office name" />
   <meta-data aspect="trv:docSearchable" property="trv:Location" display-label="Location" />
      </custom-properties>
   </advanced-search>
</config>


Custom properties "OfficeName" and "Location" are defined in the content model as type d:text and multiple=true.

In my repository there are certainly contents with OfficeName = "Dallas" AND "Chigago".
I enter this values in advanced search form:
[IMG=http://img16.imageshack.us/img16/7190/advsearch.jpg][/IMG]

but I don't get any results!
May be it is not appropriate to use the plus operator (+Dallas +Chigago)?
Any suggestions, please..

2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
In a Lucene query, the plus operator is used to specify that the search query term is mandatory. So searching for:
+@cm\:description:"Dallas" +@cm\:description:"Chicago"

is equivalent to:
@cm\:description:"Dallas" AND @cm\:description:"Portland"

In your case, you are not using Lucene syntax, you are searching in Explorer's advanced search form in a specific field. The code that turns that form into a search query does not know how to convert your list of terms into the Lucene syntax that you need (one of the examples above).

So if you really need to be able to specify multiple values for a single field on the advanced search form, I think you may have to customize the web client.

Jeff

rafaelscg
Champ on-the-rise
Champ on-the-rise
Try to change the web-client-config-custom.xml and add this:


   <config>
      <client>
         <!– set this value to true to enable AND text terms for simple/advanced search by default –>
         <search-and-terms>true</search-and-terms>
      </client>
   </config>


By default, this condition is set to "false".